eZ\Bundle\EzPublishRestBundle\EventListener\CsrfListener::__construct PHP Method

__construct() public method

Note that CSRF provider needs to be optional as it will not be available when CSRF protection is disabled.
public __construct ( Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, boolean $csrfEnabled, string $csrfTokenIntention, Symfony\Component\Security\Csrf\CsrfTokenManagerInterface $csrfTokenManager = null )
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$csrfEnabled boolean
$csrfTokenIntention string
$csrfTokenManager Symfony\Component\Security\Csrf\CsrfTokenManagerInterface
    public function __construct(EventDispatcherInterface $eventDispatcher, $csrfEnabled, $csrfTokenIntention, CsrfTokenManagerInterface $csrfTokenManager = null)
    {
        $this->eventDispatcher = $eventDispatcher;
        $this->csrfEnabled = $csrfEnabled;
        $this->csrfTokenIntention = $csrfTokenIntention;
        $this->csrfTokenManager = $csrfTokenManager;
    }