classe Action (Voir la source)

Constantes

private 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

void
pushMiddleware(array $middlewares, bool $end = false)

Add a middleware to the list

void
pushNamespace(array|string $namespace)

Adding a namespace to the list

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

Callback launcher

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

Successively launches a function list.

array|null
controller(string $controller_name)

Load the controllers defined as string

array|null
closure(Closure $closure)

Load the closure define as action

array
injector(string $classname, string|null $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

void pushMiddleware(array $middlewares, bool $end = false)

Add a middleware to the list

Paramètres

array $middlewares
bool $end

Valeur de retour

void

void pushNamespace(array|string $namespace)

Adding a namespace to the list

Paramètres

array|string $namespace

Valeur de retour

void

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

Callback launcher

Paramètres

callable|string|array $actions
array|null $param

Valeur de retour

mixed

Exceptions

RouterException
ReflectionException

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

Successively launches a function list.

Paramètres

array|callable $function
array $arg

Valeur de retour

mixed

Exceptions

ReflectionException

array|null controller(string $controller_name)

Load the controllers defined as string

Paramètres

string $controller_name

Valeur de retour

array|null

Exceptions

ReflectionException

array|null closure(Closure $closure)

Load the closure define as action

Paramètres

Closure $closure

Valeur de retour

array|null

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

Make any class injection

Paramètres

string $classname
string|null $method

Valeur de retour

array

Exceptions

ReflectionException

array injectorForClosure(callable $closure)

Injection for closure

Paramètres

callable $closure

Valeur de retour

array

Exceptions