Symfony\Component\Security\Http\Firewall\ExceptionListener::register PHP Method

register() public method

Registers a onKernelException listener to take care of security exceptions.
public register ( Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher )
$dispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface An EventDispatcherInterface instance
    public function register(EventDispatcherInterface $dispatcher)
    {
        $dispatcher->addListener(KernelEvents::EXCEPTION, array($this, 'onKernelException'));
    }