Documentation

ControllerArgumentsEvent extends KernelEvent
in package

FinalYes

Allows filtering of controller arguments.

You can call getController() to retrieve the controller and getArguments to retrieve the current arguments. With setArguments() you can replace arguments that are used to call the controller.

Arguments set in the event must be compatible with the signature of the controller.

Tags
author

Christophe Coevoet stof@notk.org

Table of Contents

Properties

$arguments  : array<string|int, mixed>
$controller  : mixed
$kernel  : mixed
$propagationStopped  : bool
$request  : mixed
$requestType  : int|null

Methods

__construct()  : mixed
getArguments()  : array<string|int, mixed>
getController()  : callable
getKernel()  : HttpKernelInterface
Returns the kernel in which this event was thrown.
getRequest()  : Request
Returns the request the kernel is currently processing.
getRequestType()  : int
Returns the request type the kernel is currently processing.
isMainRequest()  : bool
Checks if this is the main request.
isPropagationStopped()  : bool
Is propagation stopped?
setArguments()  : mixed
setController()  : mixed
stopPropagation()  : void
Stops the propagation of the event to further event listeners.

Properties

$propagationStopped

private bool $propagationStopped = false

Methods

__construct()

public __construct(HttpKernelInterface $kernel, callable $controller, array<string|int, mixed> $arguments, Request $request, int|null $requestType) : mixed
Parameters
$kernel : HttpKernelInterface
$controller : callable
$arguments : array<string|int, mixed>
$request : Request
$requestType : int|null

The request type the kernel is currently processing; one of HttpKernelInterface::MAIN_REQUEST or HttpKernelInterface::SUB_REQUEST

getRequestType()

Returns the request type the kernel is currently processing.

public getRequestType() : int
Return values
int

One of HttpKernelInterface::MAIN_REQUEST and HttpKernelInterface::SUB_REQUEST

isMainRequest()

Checks if this is the main request.

public isMainRequest() : bool
Return values
bool

isPropagationStopped()

Is propagation stopped?

public isPropagationStopped() : bool
Return values
bool

True if the Event is complete and no further listeners should be called. False to continue calling listeners.

setArguments()

public setArguments(array<string|int, mixed> $arguments) : mixed
Parameters
$arguments : array<string|int, mixed>

stopPropagation()

Stops the propagation of the event to further event listeners.

public stopPropagation() : void

If multiple event listeners are connected to the same event, no further event listener will be triggered once any trigger calls stopPropagation().


        
On this page

Search results