vendor/oi/bug/src/EventListener/CreateNotFoundListener.php line 20

Open in your IDE?
  1. <?php
  2. namespace Oi\BugBundle\EventListener;
  3. use Oi\BugBundle\Service\NotFoundManager;
  4. use Symfony\Component\HttpKernel\Event\ExceptionEvent;
  5. /**
  6.  * @author Kevin Bond <kevinbond@gmail.com>
  7.  */
  8. class CreateNotFoundListener extends NotFoundListener
  9. {
  10.     private $notFoundManager;
  11.     public function __construct(NotFoundManager $notFoundManager)
  12.     {
  13.         $this->notFoundManager $notFoundManager;
  14.     }
  15.     public function onKernelException(ExceptionEvent $event)
  16.     {
  17.         if (!$this->isNotFoundException($event)) {
  18.             return;
  19.         }
  20.         $this->notFoundManager->createFromRequest($event->getRequest());
  21.     }
  22. }