Pionia Core

PioniaApplication extends Application
in package
implements ApplicationContract, LoggerAwareInterface Uses ApplicationLifecycleHooks, AppHelpersTrait, Microable, PathsTrait, Containable

Table of Contents

Interfaces

ApplicationContract
LoggerAwareInterface

Properties

$appName  : string
$appVersion  : string
$context  : ContainerInterface|Container|null
Application container context
$env  : Arrayable|null
Environment variables
$logger  : LoggerInterface|null
Logger instance
$applicationType  : PioniaApplicationType|null
Application type
$dispatcher  : PioniaEventDispatcher|null
Event dispatcher
$envResolver  : EnvResolver|null
Environment resolver
$macros  : array<string|int, mixed>
$APP_NAME  : string
$version  : string

Methods

__call()  : mixed
Dynamically handle calls to the class.
__callStatic()  : mixed
Dynamically handle calls to the class.
__construct()  : mixed
PioniaApplication constructor.
appName()  : string
Our application name
appRoot()  : string
The root folder of the application.
boot()  : void
Register the application's boot hook listeners.
booted()  : void
Register the application's booted hook listeners.
environment()  : string
envPath()  : string
flushMacros()  : void
Remove all the macros we had registered
getEnv()  : Arrayable
getOrDefault()  : mixed
Get a value from the container or return a default value
getOrFail()  : mixed
getSilently()  : mixed
hasMacro()  : bool
Check if we have a method in the balonables
isConsoleApp()  : bool
isDevelopment()  : bool
isLinux()  : bool
isMac()  : bool
isProduction()  : bool
isRestApp()  : bool
isTesting()  : bool
isWindows()  : bool
macro()  : void
Add a new mixable to the macros
mediaPath()  : string
The path to the resources directory.
mixin()  : void
Mix another object into the class.
os()  : string
phpPath()  : string
phpVersion()  : string
powerUp()  : PioniaApplication
publicPath()  : string
The directory where the frontend assets are stored.
refreshEnv()  : void
set()  : void
Set a value in the container
setAppName()  : void
Change the core app name
setLogger()  : void
shutdown()  : void
terminate()  : void
terminated()  : void
Register the application's terminated hook listeners.
terminating()  : void
Regester the application's terminating hook listeners.
version()  : string
contextHas()  : bool
report()  : void
attemptToConnectToAnyDbAvailable()  : void
bootstrapAuthentications()  : void
bootstrapCommands()  : void
bootstrapMiddlewares()  : void

Properties

$macros

protected static array<string|int, mixed> $macros = []

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
throws
BadMethodCallException

__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
throws
BadMethodCallException

appName()

Our application name

public appName() : string
Return values
string

appRoot()

The root folder of the application.

public appRoot([string|null $path = null ][, int $levels = 3 ]) : string
Parameters
$path : string|null = null
$levels : int = 3
Return values
string

boot()

Register the application's boot hook listeners.

public boot() : void

All logic that needs to run before the application is booted

booted()

Register the application's booted hook listeners.

public booted() : void

All logic that needs to run after the application is booted

envPath()

public envPath([string|null $path = null ]) : string
Parameters
$path : string|null = null
Return values
string

flushMacros()

Remove all the macros we had registered

public static flushMacros() : void

getOrDefault()

Get a value from the container or return a default value

public getOrDefault(string $key, mixed $default) : mixed
Parameters
$key : string
$default : mixed

getOrFail()

public getOrFail(mixed $key) : mixed
Parameters
$key : mixed
Tags
throws
ContainerExceptionInterface
throws
NotFoundExceptionInterface

getSilently()

public getSilently(mixed $key) : mixed
Parameters
$key : mixed

hasMacro()

Check if we have a method in the balonables

public static hasMacro(string $name) : bool
Parameters
$name : string
Return values
bool

isDevelopment()

public isDevelopment() : bool
Return values
bool

If we are in development mode

macro()

Add a new mixable to the macros

public static macro(string $key,  $value) : void
Parameters
$key : string
$value :

mediaPath()

The path to the resources directory.

public mediaPath() : string
Return values
string

mixin()

Mix another object into the class.

public static mixin(object $mixin[, bool $replace = true ]) : void
Parameters
$mixin : object
$replace : bool = true
Tags
throws
ReflectionException

phpPath()

public phpPath() : string
Return values
string

phpVersion()

public phpVersion() : string
Return values
string

publicPath()

The directory where the frontend assets are stored.

public publicPath([ $path = null ]) : string
Parameters
$path : = null
Return values
string

set()

Set a value in the container

public set(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed

setAppName()

Change the core app name

public setAppName( $name) : void
Parameters
$name :

setLogger()

public setLogger(LoggerInterface $logger) : void
Parameters
$logger : LoggerInterface

shutdown()

public shutdown([int $status = 1 ]) : void
Parameters
$status : int = 1

terminated()

Register the application's terminated hook listeners.

public terminated() : void

All logic that needs to run after the application is terminated

terminating()

Regester the application's terminating hook listeners.

public terminating() : void

All logic that needs to run before the application is terminated

version()

public version() : string
Return values
string

The version of the application

contextHas()

protected contextHas(string $key) : bool
Parameters
$key : string
Return values
bool

report()

protected report(string $format, string $message[, array<string|int, mixed>|null $data = [] ]) : void
Parameters
$format : string
$message : string
$data : array<string|int, mixed>|null = []

attemptToConnectToAnyDbAvailable()

private attemptToConnectToAnyDbAvailable() : void

bootstrapCommands()

private bootstrapCommands() : void
Tags
throws
ContainerExceptionInterface
throws
NotFoundExceptionInterface

        
On this page

Search results