Nelmio\SecurityBundle\Twig\NelmioCSPTwigExtension::getCSPNonce PHP Method

getCSPNonce() public method

public getCSPNonce ( )
    public function getCSPNonce()
    {
        if (null === ($nonce = $this->listener->getNonce())) {
            throw new \RuntimeException('You must enable nonce to use this feature');
        }
        return $nonce;
    }