class PrecognitionControllerDispatcher extends ControllerDispatcher (View source)

Traits

Properties

protected Container $container

The container instance.

from  ControllerDispatcher

Methods

static bool
methodExcludedByOptions(string $method, array $options)

Determine if the given options exclude a particular method.

array
resolveClassMethodDependencies(array $parameters, object $instance, string $method)

Resolve the object method's type-hinted dependencies.

array
resolveMethodDependencies(array $parameters, ReflectionFunctionAbstract $reflector)

Resolve the given method's type-hinted dependencies.

mixed
transformDependency(ReflectionParameter $parameter, array $parameters, object $skippableValue)

Attempt to transform the given parameter into a class instance.

bool
alreadyInParameters(string $class, array $parameters)

Determine if an object of the given class is in a list of parameters.

void
spliceIntoParameters(array $parameters, string $offset, mixed $value)

Splice the given value into the parameter list.

void
__construct(Container $container)

Create a new controller dispatcher instance.

mixed
dispatch(Route $route, mixed $controller, string $method)

Dispatch a request to a given controller and method.

array
resolveParameters(Route $route, mixed $controller, string $method)

Resolve the parameters for the controller.

array
getMiddleware(Controller $controller, string $method)

Get the middleware for the controller instance.

$this
ensureMethodExists(object $controller, string $method)

Ensure that the given method exists on the controller.

Details

static bool methodExcludedByOptions(string $method, array $options)

Determine if the given options exclude a particular method.

Parameters

string $method
array $options

Return Value

bool

protected array resolveClassMethodDependencies(array $parameters, object $instance, string $method)

Resolve the object method's type-hinted dependencies.

Parameters

array $parameters
object $instance
string $method

Return Value

array

array resolveMethodDependencies(array $parameters, ReflectionFunctionAbstract $reflector)

Resolve the given method's type-hinted dependencies.

Parameters

array $parameters
ReflectionFunctionAbstract $reflector

Return Value

array

protected mixed transformDependency(ReflectionParameter $parameter, array $parameters, object $skippableValue)

Attempt to transform the given parameter into a class instance.

Parameters

ReflectionParameter $parameter
array $parameters
object $skippableValue

Return Value

mixed

protected bool alreadyInParameters(string $class, array $parameters)

Determine if an object of the given class is in a list of parameters.

Parameters

string $class
array $parameters

Return Value

bool

protected void spliceIntoParameters(array $parameters, string $offset, mixed $value)

Splice the given value into the parameter list.

Parameters

array $parameters
string $offset
mixed $value

Return Value

void

void __construct(Container $container)

Create a new controller dispatcher instance.

Parameters

Container $container

Return Value

void

mixed dispatch(Route $route, mixed $controller, string $method)

Dispatch a request to a given controller and method.

Parameters

Route $route
mixed $controller
string $method

Return Value

mixed

protected array resolveParameters(Route $route, mixed $controller, string $method)

Resolve the parameters for the controller.

Parameters

Route $route
mixed $controller
string $method

Return Value

array

array getMiddleware(Controller $controller, string $method)

Get the middleware for the controller instance.

Parameters

Controller $controller
string $method

Return Value

array

protected $this ensureMethodExists(object $controller, string $method)

Ensure that the given method exists on the controller.

Parameters

object $controller
string $method

Return Value

$this