Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class RouterListener extends sfRouterListener
- {
- protected $exception;
- public function onEarlyKernelRequest(GetResponseEvent $event)
- {
- $return = parent::onEarlyKernelRequest($event);
- try {
- $this->onKernelRequest($event);
- } catch (Exception $e) {
- $this->exception = $e;
- }
- return $return;
- }
- public function onKernelRequest(GetResponseEvent $event)
- {
- if ($this->exception) {
- throw $this->exception;
- }
- return parent::onKernelRequest($event);
- }
- }
Add Comment
Please, Sign In to add comment