Nelmio\SecurityBundle\Tests\Listener\ContentSecurityPolicyListenerTest::buildSimpleListener PHP Метод

buildSimpleListener() защищенный Метод

protected buildSimpleListener ( array $directives, $reportOnly = false, $compatHeaders = true, $contentTypes = [] )
$directives array
    protected function buildSimpleListener(array $directives, $reportOnly = false, $compatHeaders = true, $contentTypes = array())
    {
        $directiveSet = new DirectiveSet(new PolicyManager());
        $directiveSet->setDirectives($directives);
        if ($reportOnly) {
            return new ContentSecurityPolicyListener($directiveSet, new DirectiveSet(new PolicyManager()), $this->nonceGenerator, $this->shaComputer, $compatHeaders, $contentTypes);
        } else {
            return new ContentSecurityPolicyListener(new DirectiveSet(new PolicyManager()), $directiveSet, $this->nonceGenerator, $this->shaComputer, $compatHeaders, $contentTypes);
        }
    }