PHP Class Symfony\Component\HttpKernel\EventListener\FragmentListener

All URL paths starting with /_fragment are handled as content fragments by this listener. If throws an AccessDeniedHttpException exception if the request is not signed or if it is not an internal sub-request.
Author: Fabien Potencier ([email protected])
Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Mostrar archivo Open project: symfony/http-kernel Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\HttpKernel\UriSigner $signer, string $fragmentPath = '/_fragment' ) Constructor.
getSubscribedEvents ( )
onKernelRequest ( GetResponseEvent $event ) Fixes request attributes when the path is '/_fragment'.

Protected Methods

Method Description
validateRequest ( Request $request )

Method Details

__construct() public method

Constructor.
public __construct ( Symfony\Component\HttpKernel\UriSigner $signer, string $fragmentPath = '/_fragment' )
$signer Symfony\Component\HttpKernel\UriSigner A UriSigner instance
$fragmentPath string The path that triggers this listener

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

onKernelRequest() public method

Fixes request attributes when the path is '/_fragment'.
public onKernelRequest ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent A GetResponseEvent instance

validateRequest() protected method

protected validateRequest ( Request $request )
$request Symfony\Component\HttpFoundation\Request