Skip to content

Commit

Permalink
Simplify behaviors init
Browse files Browse the repository at this point in the history
  • Loading branch information
robertpustulka committed Jun 23, 2015
1 parent d4342fc commit 8a257cf
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ORM/Table.php
Expand Up @@ -279,12 +279,8 @@ public function __construct(array $config = [])
}
}
$this->_eventManager = $eventManager ?: new EventManager();
if ($behaviors) {
$behaviors->setTable($this);
} else {
$behaviors = new BehaviorRegistry($this);
}
$this->_behaviors = $behaviors;
$this->_behaviors = $behaviors ?: new BehaviorRegistry();
$this->_behaviors->setTable($this);
$this->_associations = $associations ?: new AssociationCollection();

$this->initialize($config);
Expand Down

0 comments on commit 8a257cf

Please sign in to comment.