Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
Merge pull request #82 from timble/feature/81-mixin
Browse files Browse the repository at this point in the history
Do not mix EventMixin automatically
  • Loading branch information
johanjanssens committed May 3, 2016
2 parents 2d85e29 + 1fe3f6a commit f86b037
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 13 deletions.
4 changes: 0 additions & 4 deletions code/controller/abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ public function __construct( ObjectConfig $config)

// Mixin the behavior (and command) interface
$this->mixin('lib:behavior.mixin', $config);

// Mixin the event interface
$this->mixin('lib:event.mixin', $config);
}

/**
Expand All @@ -93,7 +90,6 @@ public function __construct( ObjectConfig $config)
protected function _initialize(ObjectConfig $config)
{
$config->append(array(
'command_chain' => 'lib:command.chain',
'command_handlers' => array('lib:command.handler.event'),
'dispatched' => false,
'request' => array(),
Expand Down
2 changes: 1 addition & 1 deletion code/dispatcher/abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __construct(ObjectConfig $config)
$this->addCommandCallback('before.dispatch', '_resolveRequest');

//Register the default exception handler
$this->addEventListener('onException', array($this, 'fail'));
$this->getObject('event.publisher')->addListener('onException', array($this, 'fail'));
}

/**
Expand Down
6 changes: 1 addition & 5 deletions code/model/abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ public function __construct(ObjectConfig $config)

// Mixin the behavior interface
$this->mixin('lib:behavior.mixin', $config);

// Mixin the event interface
$this->mixin('lib:event.mixin', $config);
}

/**
Expand All @@ -81,7 +78,6 @@ protected function _initialize(ObjectConfig $config)
'identity_key' => null,
'state' => 'lib:model.state',
'state_defaults' => array(),
'command_chain' => 'lib:command.chain',
'command_handlers' => array('lib:command.handler.event'),
));

Expand Down Expand Up @@ -162,7 +158,7 @@ final public function count()
* Reset the model data and state
*
* @param array $modified List of changed state names
* @return $this
* @return ModelAbstract
*/
final public function reset(array $modified = array())
{
Expand Down
3 changes: 0 additions & 3 deletions code/view/abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ public function __construct(ObjectConfig $config)
// Mixin the behavior (and command) interface
$this->mixin('lib:behavior.mixin', $config);

// Mixin the event interface
$this->mixin('lib:event.mixin', $config);

//Fetch the view data before rendering
$this->addCommandCallback('before.render', '_fetchData');
}
Expand Down

0 comments on commit f86b037

Please sign in to comment.