PHP Class Contao\CoreBundle\EventListener\MergeHttpHeadersListener

ファイルを表示 Open project: contao/core-bundle Class Usage Examples

Public Methods

Method Description
__construct ( Contao\CoreBundle\Framework\ContaoFrameworkInterface $contaoFramework ) Constructor.
addMultiHeader ( string $name ) Adds a multi-value header.
getHeaders ( ) : array Returns the headers.
getMultiHeaders ( ) : array Returns the multi-value headers.
onKernelResponse ( FilterResponseEvent $event ) Adds the Contao headers to the Symfony response.
removeMultiHeader ( string $name ) Removes a multi-value header.
setHeaders ( array $headers ) Sets the headers.
setMultiHeader ( array $headers ) Sets the multi-value headers.

Private Methods

Method Description
getUniqueKey ( string $name ) : string Returns the unique header key.
mergeHttpHeaders ( Response $response ) : Response Merges the HTTP headers.

Method Details

__construct() public method

Constructor.
public __construct ( Contao\CoreBundle\Framework\ContaoFrameworkInterface $contaoFramework )
$contaoFramework Contao\CoreBundle\Framework\ContaoFrameworkInterface

addMultiHeader() public method

Adds a multi-value header.
public addMultiHeader ( string $name )
$name string

getHeaders() public method

Returns the headers.
public getHeaders ( ) : array
return array

getMultiHeaders() public method

Returns the multi-value headers.
public getMultiHeaders ( ) : array
return array

onKernelResponse() public method

Adds the Contao headers to the Symfony response.
public onKernelResponse ( FilterResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\FilterResponseEvent

removeMultiHeader() public method

Removes a multi-value header.
public removeMultiHeader ( string $name )
$name string

setHeaders() public method

Sets the headers.
public setHeaders ( array $headers )
$headers array

setMultiHeader() public method

Sets the multi-value headers.
public setMultiHeader ( array $headers )
$headers array