private function parseDirectives($header)
    {
        $directives = [];

        foreach (explode(';', $header) as $directive) {
            $parts = explode(' ', trim($directive));
            if (\count($parts) < 1) {
                continue;
            }
            $name = array_shift($parts);
            $directives[$name] = $parts;
        }

        return $directives;
    }
private function parseDirectives($header)
    {
        $directives = [];

        foreach (explode(';', $header) as $directive) {
            $parts = explode(' ', trim($directive));
            if (\count($parts) < 1) {
                continue;
            }
            $name = array_shift($parts);
            $directives[$name] = $parts;
        }

        return $directives;
    }
private function parseDirectives ( $ header ) { $ directives = [ ] ; foreach ( explode ( ';' , $ header ) as $ directive ) { $ parts = explode ( ' ' , trim ( $ directive ) ) ; if ( \ count ( $ parts ) < 1 ) { continue ; } $ name = array_shift ( $ parts ) ; $ directives [ $ name ] = $ parts ; } return $ directives ; }
Converts a Content-Security-Policy header value into a directive set array.

@param string $header The header value

@return array The directive set
Converts a Content - Security - Policy header value into a directive set array .