PHP Class Contao\CoreBundle\EventListener\MergeHttpHeadersListener

Afficher le fichier Open project: contao/core-bundle Class Usage Examples

Méthodes publiques

Méthode 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

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

Method Details

__construct() public méthode

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

addMultiHeader() public méthode

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

getHeaders() public méthode

Returns the headers.
public getHeaders ( ) : array
Résultat array

getMultiHeaders() public méthode

Returns the multi-value headers.
public getMultiHeaders ( ) : array
Résultat array

onKernelResponse() public méthode

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

removeMultiHeader() public méthode

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

setHeaders() public méthode

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

setMultiHeader() public méthode

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