Skip to content

Commit

Permalink
Refactor Zend\\Module\\Manager::setDefaultListeners() for less lines
Browse files Browse the repository at this point in the history
- A few less lines, does not sacrifice readability, IMO.
  • Loading branch information
EvanDotPro committed Nov 14, 2011
1 parent ffe1c20 commit 9809836
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions library/Zend/Module/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,9 @@ protected function setDefaultListeners()
return $this;
}
$options = $this->getDefaultListenerOptions();
$init = new InitTrigger($options);
$config = new ConfigListener($options);
$autoload = new AutoloaderTrigger($options);
$this->events()->attach('loadModule', $init, 1000);
$this->events()->attach('loadModule', $config, 1000);
$this->events()->attach('loadModule', $autoload, 1000);
$this->events()->attach('loadModule', new InitTrigger($options), 1000);
$this->events()->attach('loadModule', new ConfigListener($options), 1000);
$this->events()->attach('loadModule', new AutoloaderTrigger($options), 1000);
return $this;
}

Expand Down

0 comments on commit 9809836

Please sign in to comment.