Browse Source

change default config to be an instance property

Apparently left over from the first behavior itteration
AD7six 12 years ago
parent
commit
e70ee09b64

+ 1 - 1
src/Model/Behavior/TimestampBehavior.php

@@ -36,7 +36,7 @@ class TimestampBehavior extends Behavior {
  *
  * @var array
  */
-	protected static $_defaultConfig = [
+	protected $_defaultConfig = [
 		'implementedFinders' => [],
 		'implementedMethods' => [
 			'timestamp' => 'timestamp',

+ 1 - 1
src/Model/Behavior/TranslateBehavior.php

@@ -58,7 +58,7 @@ class TranslateBehavior extends Behavior {
  *
  * @var array
  */
-	protected static $_defaultConfig = [
+	protected $_defaultConfig = [
 		'implementedFinders' => ['translations' => 'findTranslations'],
 		'implementedMethods' => ['locale' => 'locale'],
 		'fields' => [],

+ 2 - 2
src/ORM/Behavior.php

@@ -109,7 +109,7 @@ class Behavior implements EventListener {
  *
  * @var array
  */
-	protected static $_defaultConfig = [];
+	protected $_defaultConfig = [];
 
 /**
  * Contains configuration.
@@ -130,7 +130,7 @@ class Behavior implements EventListener {
  * @param array $config The config for this behavior.
  */
 	public function __construct(Table $table, array $config = []) {
-		$this->_config = $config + static::$_defaultConfig;
+		$this->_config = $config + $this->_defaultConfig;
 	}
 
 /**