src/CSPBuilder.php
public function getHeaderArray(bool $legacy = true): array
    {
        if ($this->needsCompile) {
            $this->compile();
        }
        $return = [];
        foreach ($this->getHeaderKeys($legacy) as $key) {
            $return[(string) $key] = $this->compiled;
        }
        return $return;
    }
public function getHeaderArray(bool $legacy = true): array
    {
        if ($this->needsCompile) {
            $this->compile();
        }
        $return = [];
        foreach ($this->getHeaderKeys($legacy) as $key) {
            $return[(string) $key] = $this->compiled;
        }
        return $return;
    }
public function getHeaderArray ( bool $ legacy = true ) : array { if ( $ this -> needsCompile ) { $ this -> compile ( ) ; } $ return = [ ] ; foreach ( $ this -> getHeaderKeys ( $ legacy ) as $ key ) { $ return [ ( string ) $ key ] = $ this -> compiled ; } return $ return ; }
Get an associative array of headers to return.

@param bool $legacy
@return array<string, string>
Get an associative array of headers to return .