Compass
class Compass (View source)
Constants
| private INJECTION_EXCEPTION_TYPE |
|
Methods
__construct(array $namespaces, array $middlewares)
Compass constructor
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
static Compass
getInstance()
Retrieves Compass instance
array|null
controller(string $controller_name)
Load the controllers defined as string
array
injector(string $classname, string|null $method = null)
Make any class injection
array
injectorForClosure(Closure|callable $closure)
Injection for closure
mixed
execute(array|callable|string $function, array $arguments)
Successively launches a function list.
Details
__construct(array $namespaces, array $middlewares)
Compass constructor
static Compass
configure(array $namespaces, array $middlewares)
Compass configuration
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
static Compass
getInstance()
Retrieves Compass instance
array|null
controller(string $controller_name)
Load the controllers defined as string
array
injector(string $classname, string|null $method = null)
Make any class injection
array
injectorForClosure(Closure|callable $closure)
Injection for closure
mixed
execute(array|callable|string $function, array $arguments)
Successively launches a function list.
array|null
closure(Closure $closure)
Load the closure define as action