AppProvider
extends BaseProvider
in package
Base class for service providers.
This class provides a way to register middlewares, authentications, routes and commands to the application from a service provider.
Table of Contents
Properties
- $macros : array<string|int, mixed>
- $pionia : PioniaApplication
Methods
- __call() : mixed
- Dynamically handle calls to the class.
- __callStatic() : mixed
- Dynamically handle calls to the class.
- __construct() : mixed
- BaseProvider constructor.
- authentications() : AuthenticationChain
- Chain your service authentications to the application's authentication chain.
- commands() : array<string|int, mixed>
- Register your service commands to the application's command system.
- flushMacros() : void
- Remove all the macros we had registered
- hasMacro() : bool
- Check if we have a method in the balonables
- macro() : void
- Add a new mixable to the macros
- middlewares() : MiddlewareChain
- Chain your service middlewares to the application's middleware chain.
- mixin() : void
- Mix another object into the class.
- onBooted() : void
- Add logic to the application's booted hook.
- onTerminate() : void
- Add logic to the application's terminating hook.
- routes() : PioniaRouter
- Add your service routes to the application's router system.
Properties
$macros
protected
static array<string|int, mixed>
$macros
= []
$pionia
protected
PioniaApplication
$pionia
Methods
__call()
Dynamically handle calls to the class.
public
__call(string $method, array<string|int, mixed> $parameters) : mixed
Parameters
- $method : string
- $parameters : array<string|int, mixed>
Tags
__callStatic()
Dynamically handle calls to the class.
public
static __callStatic(string $method, array<string|int, mixed> $parameters) : mixed
Parameters
- $method : string
- $parameters : array<string|int, mixed>
Tags
__construct()
BaseProvider constructor.
public
__construct(PioniaApplication $pionia) : mixed
Parameters
- $pionia : PioniaApplication
authentications()
Chain your service authentications to the application's authentication chain.
public
authentications(AuthenticationChain $authenticationChain) : AuthenticationChain
Parameters
- $authenticationChain : AuthenticationChain
Return values
AuthenticationChaincommands()
Register your service commands to the application's command system.
public
commands() : array<string|int, mixed>
Return values
array<string|int, mixed>flushMacros()
Remove all the macros we had registered
public
static flushMacros() : void
hasMacro()
Check if we have a method in the balonables
public
static hasMacro(string $name) : bool
Parameters
- $name : string
Return values
boolmacro()
Add a new mixable to the macros
public
static macro(string $key, $value) : void
Parameters
middlewares()
Chain your service middlewares to the application's middleware chain.
public
middlewares(MiddlewareChain $middlewareChain) : MiddlewareChain
Parameters
- $middlewareChain : MiddlewareChain
Return values
MiddlewareChainmixin()
Mix another object into the class.
public
static mixin(object $mixin[, bool $replace = true ]) : void
Parameters
- $mixin : object
- $replace : bool = true
Tags
onBooted()
Add logic to the application's booted hook.
public
onBooted() : void
onTerminate()
Add logic to the application's terminating hook.
public
onTerminate() : void
routes()
Add your service routes to the application's router system.
public
routes(PioniaRouter $router) : PioniaRouter
Parameters
- $router : PioniaRouter