WebKernel
in package
implements
KernelContract
Uses
Microable
Table of Contents
Interfaces
Properties
- $macros : array<string|int, mixed>
- $app : PioniaApplication
- $logger : LoggerInterface
Methods
- __call() : mixed
- Dynamically handle calls to the class.
- __callStatic() : mixed
- Dynamically handle calls to the class.
- __construct() : mixed
- autoDiscoverContentType() : string
- boot() : Request
- Boot the kernel. This also runs the middleware chain and the authentication chain
- container() : Container
- flushMacros() : void
- Remove all the macros we had registered
- getApplication() : ApplicationContract
- Get the application instance.
- handle() : Response
- hasMacro() : bool
- Check if we have a method in the balonables
- macro() : void
- Add a new mixable to the macros
- mixin() : void
- Mix another object into the class.
- terminate() : Response
- This method is called after the request has been handled
- isApiRequest() : bool
- isMedia() : bool
- If its an upload we load it from the media folder in our storage
- isRoot() : bool
- if the request is on root E.g. http://localhost:8080/ -- here we either load the default landing framework page or load any .html file we find in the statics folders
- loadWelcomePage() : void
- The developer can override and access the entire context of the application in the overridden page
- resolveFrontEnd() : void
- Resolves the front end if the request is a get request and the path is not an api path
- serveSpa() : void
- Serve the landing html file of the spa if it exists
Properties
$macros
protected
static array<string|int, mixed>
$macros
= []
$app
private
PioniaApplication
$app
$logger
private
LoggerInterface
$logger
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()
public
__construct(PioniaApplication $application) : mixed
Parameters
- $application : PioniaApplication
autoDiscoverContentType()
public
autoDiscoverContentType(string $filePath) : string
Parameters
- $filePath : string
Return values
stringboot()
Boot the kernel. This also runs the middleware chain and the authentication chain
public
boot(Request $request) : Request
Parameters
- $request : Request
Return values
Requestcontainer()
public
container() : Container
Return values
ContainerflushMacros()
Remove all the macros we had registered
public
static flushMacros() : void
getApplication()
Get the application instance.
public
getApplication() : ApplicationContract
Return values
ApplicationContracthandle()
public
handle(Request $request) : Response
Parameters
- $request : Request
Return values
ResponsehasMacro()
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
mixin()
Mix another object into the class.
public
static mixin(object $mixin[, bool $replace = true ]) : void
Parameters
- $mixin : object
- $replace : bool = true
Tags
terminate()
This method is called after the request has been handled
public
terminate(Request $request, BaseResponse $response) : Response
Parameters
- $request : Request
- $response : BaseResponse
Return values
ResponseisApiRequest()
private
isApiRequest(Request $request) : bool
Parameters
- $request : Request
Return values
boolisMedia()
If its an upload we load it from the media folder in our storage
private
isMedia(Request $request) : bool
Parameters
- $request : Request
Return values
boolisRoot()
if the request is on root E.g. http://localhost:8080/ -- here we either load the default landing framework page or load any .html file we find in the statics folders
private
isRoot(Request $request) : bool
Parameters
- $request : Request
Return values
boolloadWelcomePage()
The developer can override and access the entire context of the application in the overridden page
private
loadWelcomePage(Request $request) : void
Parameters
- $request : Request
resolveFrontEnd()
Resolves the front end if the request is a get request and the path is not an api path
private
resolveFrontEnd(Request $request) : void
Using any frontend of your choice, you can serve the front end from the root of the project
Parameters
- $request : Request
serveSpa()
Serve the landing html file of the spa if it exists
private
serveSpa(Request $request, Filesystem $fs) : void
Parameters
- $request : Request
- $fs : Filesystem