Skip to content

Commit

Permalink
Remove redundant event parameter.
Browse files Browse the repository at this point in the history
This parameter is now redundant, remove it.
  • Loading branch information
markstory committed Jul 18, 2013
1 parent 670bfde commit cab1a39
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Cake/Controller/Controller.php
Expand Up @@ -650,8 +650,8 @@ public function setEventManager($eventManager) {
* @return void
*/
public function startupProcess() {
$this->getEventManager()->dispatch(new Event('Controller.initialize', $this, [$this]));
$this->getEventManager()->dispatch(new Event('Controller.startup', $this, [$this]));
$this->getEventManager()->dispatch(new Event('Controller.initialize', $this));
$this->getEventManager()->dispatch(new Event('Controller.startup', $this));
}

/**
Expand All @@ -664,7 +664,7 @@ public function startupProcess() {
* @return void
*/
public function shutdownProcess() {
$this->getEventManager()->dispatch(new Event('Controller.shutdown', $this, [$this]));
$this->getEventManager()->dispatch(new Event('Controller.shutdown', $this));
}

/**
Expand Down Expand Up @@ -738,7 +738,7 @@ public function redirect($url, $status = null, $exit = true) {
if (is_array($status)) {
extract($status, EXTR_OVERWRITE);
}
$event = new Event('Controller.beforeRedirect', $this, array($this, $url, $status, $exit));
$event = new Event('Controller.beforeRedirect', $this, array($url, $status, $exit));
$this->getEventManager()->dispatch($event);

if ($event->isStopped()) {
Expand Down Expand Up @@ -876,7 +876,7 @@ public function validateErrors() {
* @link http://book.cakephp.org/2.0/en/controllers.html#Controller::render
*/
public function render($view = null, $layout = null) {
$event = new Event('Controller.beforeRender', $this, [$this]);
$event = new Event('Controller.beforeRender', $this);
$this->getEventManager()->dispatch($event);
if ($event->isStopped()) {
$this->autoRender = false;
Expand Down

0 comments on commit cab1a39

Please sign in to comment.