classe Action (Voir la source)

Constantes

INJECTION_EXCEPTION_TYPE

Méthodes

__construct(array $namespaces, array $middlewares)

Action constructor

static Action
configure(array $namespaces, array $middlewares)

Action configuration

static Action
getInstance()

Retrieves Action instance

pushMiddleware(array|callable $middlewares, bool $end = false)

Add a middleware to the list

pushNamespace(array|string $namespace)

Adding a namespace to the list

mixed
call(callable|string|array $actions, mixed $param = null)

Callback launcher

mixed
execute(array|callable $arr, array|callable $arg)

Successively launches a function list.

array
controller(string $controller_name)

Load the controllers defined as string

array
closure(Closure $closure)

Load the closure define as action

array
injector(string $classname, string $method = null)

Make any class injection

array
injectorForClosure(callable $closure)

Injection for closure

Détails

__construct(array $namespaces, array $middlewares)

Action constructor

Paramètres

array $namespaces
array $middlewares

static Action configure(array $namespaces, array $middlewares)

Action configuration

Paramètres

array $namespaces
array $middlewares

Valeur de retour

Action

static Action getInstance()

Retrieves Action instance

Valeur de retour

Action

pushMiddleware(array|callable $middlewares, bool $end = false)

Add a middleware to the list

Paramètres

array|callable $middlewares
bool $end

pushNamespace(array|string $namespace)

Adding a namespace to the list

Paramètres

array|string $namespace

mixed call(callable|string|array $actions, mixed $param = null)

Callback launcher

Paramètres

callable|string|array $actions
mixed $param

Valeur de retour

mixed

Exceptions

RouterException
ReflectionException

mixed execute(array|callable $arr, array|callable $arg)

Successively launches a function list.

Paramètres

array|callable $arr
array|callable $arg

Valeur de retour

mixed

Exceptions

ReflectionException

array controller(string $controller_name)

Load the controllers defined as string

Paramètres

string $controller_name

Valeur de retour

array

Exceptions

ReflectionException

array closure(Closure $closure)

Load the closure define as action

Paramètres

Closure $closure

Valeur de retour

array

array injector(string $classname, string $method = null)

Make any class injection

Paramètres

string $classname
string $method

Valeur de retour

array

Exceptions

ReflectionException

array injectorForClosure(callable $closure)

Injection for closure

Paramètres

callable $closure

Valeur de retour

array

Exceptions