Skip to content

Commit

Permalink
Trigger events onBeforeRespond/onAfterRespond on redirection (#20677)
Browse files Browse the repository at this point in the history
  • Loading branch information
csthomas authored and Michael Babker committed Sep 22, 2018
1 parent 263a2d5 commit 549ff03
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libraries/src/Application/WebApplication.php
Expand Up @@ -621,9 +621,15 @@ public function redirect($url, $status = 303)
}
}

// Trigger the onBeforeRespond event.
$this->triggerEvent('onBeforeRespond');

// Set appropriate headers
$this->respond();

// Trigger the onAfterRespond event.
$this->triggerEvent('onAfterRespond');

// Close the application after the redirect.
$this->close();
}
Expand Down

0 comments on commit 549ff03

Please sign in to comment.