Menu

## PioniaApplication extends Application
in package
implements ApplicationContract, LoggerAwareInterface Uses ApplicationLifecycleHooks, AppHelpersTrait, Microable, PathsTrait, AppDatabaseHelper, BuiltInServices, Cacheable, Containable

PioniaApplication.php : 47

### Table of Contents

#### Interfaces

ApplicationContract
LoggerAwareInterface

#### Properties

$appItemsCacheTTL : int
  App specific cacheacbles' time to live in caches.
$appName : string
  Application name
$appProviders : Arrayable
  These shall be used to run the onBooted and onTermine lifecycle hooks against every provider
$appVersion : string
  Framework version
$cachePrefix : string
  The cache prefix to use for caching.
$cacheTtl : int
  The cache ttl to use for caching.
$context : ContainerInterface|Container|null
  Application container context
$dispatcher : PioniaEventDispatcher|null
  Event dispatcher
$env : Arrayable|null
  Environment variables
$logger : LoggerInterface|null
  Logger instance
$unResolvedAppProviders : Arrayable|null
  Resolved cached providers are cached, if the provider is not found in caches, then we resolve it as new, and cache for later requests
$applicationType : PioniaApplicationType|null
  Application type
$booted : bool
$bootedCallbacks : array<string|int, mixed>
  The booted callbacks
$bootingCallbacks : array<string|int, mixed>
  The booting callbacks, callbacks to call before the app runs
$cacheAdaptor : PioniaCacheAdaptor|null
$envResolver : EnvResolver|null
  Environment resolver
$macros : array<string|int, mixed>
$terminatedCallbacks : array<string|int, mixed>
  The terminated callbacks, run after terminating the application
$terminatingCallbacks : array<string|int, mixed>
  The terminating callbacks, run before terminating the application
$APP_NAME : string
$cacheInstance : PioniaCache|null
  The cache instance to use for caching.
$version : string

#### Methods

__call() : mixed
  Dynamically handle calls to the class.
__callStatic() : mixed
  Dynamically handle calls to the class.
__construct() : mixed
  PioniaApplication constructor.
addAlias() : static
  Adds an alias to the context list of aliases
addAppProvider() : static
  Register a new provider in the app context(di) Appends the new provider into the existing array of providers
addMiddleware() : $this
  Add a single middleware to the chain
addQueryToPool() : static
alias() : mixed
  Get any alias from the context
allowedOrigins() : $this
  If set, these shall be the only addresses that can access the application
appName() : string
  Our application name
appRoot() : string
  The root folder of the application.
blockedOrigins() : $this
  If set, these origins shall be prevented from accessing the application
bootConsole() : int
booted() : static
  Register callbacks to be run after the application is booted This method can be called multiple times to add more hooks
booting() : $this
  Register hooks to mutate the application booting cycle.
bootstrapCommandsFromProviders() : Arrayable
  Collect commands from app providers
cache() : bool|mixed
  Caches the value if the value is not null.
ClearByKeys() : bool
  Clear the cache.
contextArrAdd() : void
contextHas() : bool
  Check if a value exists in the container
contextMake() : mixed
  Make an instance of a class from the container. This will throw an exception if the class is not found
contextMakeSilently() : mixed
  Create an instance of a class without throwing an exception when it fails
ddInfo() : Arrayable
  Return everything about database connections discovered
defaultOrFirst() : mixed
  Get a database connection from the pool of connections we have
deleteCache() : bool
  Delete the cache for the key.
dispatch() : void
  Dispatches an event from anywhere in the application
environment() : string
envPath() : string
flushMacros() : void
  Remove all the macros we had registered
formatCommandString() : string
  Format the given command as a fully-qualified executable command.
getAppName() : mixed
getCache() : mixed
getCacheInstance() : PioniaCache|null
getDirFor() : string|null
  Get the directory for a given alias
getDiscoveredConnections() : Arrayable
  Get the discovered database connections that are available in our environment
getEnv() : PioniaApplicationType
  Get all the environment variables or the value of a single key Will check in the $_ENV, $_SERVER, container, and in the local env array for the same key, other will return all
getOrDefault() : mixed
  Get a value from the container or return a default value
getOrFail() : mixed
  Get a value from the container or throw an exception.
getSilently() : mixed
  Get a value from the container or return null instead of throwing an exception
handleRequest() : Response
hasCache() : bool
  Check if the cache has the key.
hasMacro() : bool
  Check if we have a method in the balonables
httpsOnly() : $this
  If set, only https requests shall be allowed
isBooted() : bool
  Check if the application is booted
isCachedIn() : bool
  Checks if a certain keyToCheck is set in the cache under a certain keyCached.
isConsoleApp() : bool
isDebug() : mixed
isDevelopment() : bool
isLinux() : bool
isMac() : bool
isProduction() : bool
isRestApp() : bool
isTesting() : bool
isWindows() : bool
macro() : void
  Add a new mixable to the macros
make() : mixed
  Build an entry of the container by its name.
mediaPath() : string
  The path to the resources directory.
middlewareChain() : $this
  When this is used, the closure passed must return a MiddlewareChain instance Middlewares in this chain will be added to the context and will be the only middlewares used
mixin() : void
  Mix another object into the class.
os() : string
php() : string
  Get the PHP binary.
phpPath() : string
phpVersion() : string
pioniaBinary() : string
  Get the pionia cli binary.
powerUp() : PioniaApplication
  Boot the app
prepareConsole() : void
  Sync the commands from the configuration and add them to the console application
publicPath() : string
  The directory where the frontend assets are stored.
refreshEnv() : void
resolve() : mixed
  Get any entry from the container by its id
set() : static
  Set a value in the container
setAppName() : void
  Change the core app name
setCache() : bool
setCacheInstance() : void
  Set the cache instance to use for caching.
setEnv() : void
setLogger() : void
shutdown() : void
  Shutdown the application
supportedMethods() : array<string|int, mixed>
terminate() : void
  Shutdown the application
terminated() : void
  Register the application's terminated hook listeners.
terminating() : void
  Register the application's terminating hooks.
updateCache() : void
version() : string
welcomePageSettings() : Arrayable
withCacheAdaptor() : $this
  Sets the Cache Adaptor the app shall use hence-forth Defaults to a filesystem adapter
withEndPoints() : PioniaApplication|null
bootAuthenticationsInProviders() : AuthenticationChain
  Bootstrap authentications coming from providers. This runs post internal authentications
builtInAliases() : Arrayable
  Builtin Aliases
builtInAuthentications() : Arrayable
  Get the built-in services provided by the application.
builtInCommands() : Arrayable
  Get the built-in services provided by the application.
builtinDirectories() : Arrayable
  Builtin Aliases
builtInMiddlewares() : Arrayable
  Get the built-in services provided by the application.
builtinNameSpaces() : Arrayable
builtinProviders() : Arrayable
report() : void
resolveProviders() : PioniaApplication
  Registers all app providers registered in the .ini files that were collected in the env
resolveRoutesFromProviders() : PioniaRouter
bootProviders() : void
  Runs the boot method of each provider
bootstrapAuthentications() : void
  Adds the collected auths to the context Can also cache the authentications for future use
bootstrapCommands() : void
  Collect all the commands from the environment and the context
bootstrapMiddlewares() : void
bootstrapMiddlewaresInProviders() : MiddlewareChain
  Passes the middleware chain in the app providers and caches the process
calculateUnresolvedProviders() : Arrayable|null
  we only want to start resolving only new providers
callBootedCallbacks() : void
  Run all booted callbacks
callBootingCallbacks() : void
  Run all booting callbacks
callTerminatedCallbacks() : void
  Run all terminated callbacks
callTerminatingCallbacks() : void
  Run all terminating callbacks
cleanCacheKey() : string
getKeyName() : string
  Converts the key to snake case and appends the current class prefix if it does not exist.
logger() : LoggerInterface|null
registerBaseRoutesInstance() : void
  Add the base routes instance to the context We shall be merging all routes to this instance
registerCorsInstance() : void
  Add the cors instance to the context
resolveLogger() : $this
  Set up the context logger
setDefaultCachingAdaptor() : void
  Set the default caching adaptor to use

### Properties

#### $appItemsCacheTTL

PioniaApplication.php : 68

App specific cacheacbles' time to live in caches.

`public int $appItemsCacheTTL = 0`

#### $appName

PioniaApplication.php : 62

Application name

`public string $appName = 'Pionia Framework'`

#### $appProviders

PioniaApplication.php : 92

These shall be used to run the onBooted and onTermine lifecycle hooks against every provider

`public Arrayable $appProviders`

#### $appVersion

PioniaApplication.php : 74

Framework version

`public string $appVersion = '2.0.2'`

#### $cachePrefix

Cacheable.php : 24

The cache prefix to use for caching.

`public string $cachePrefix = __CLASS__`

#### $cacheTtl

Cacheable.php : 30

The cache ttl to use for caching.

`public int $cacheTtl = 60`

Defaults to 60 seconds.

#### $context

Containable.php : 25

Application container context

`public ContainerInterface|Container|null $context`

#### $dispatcher

PioniaApplication.php : 118

Event dispatcher

`public PioniaEventDispatcher|null $dispatcher`

#### $env

PioniaApplication.php : 86

Environment variables

`public Arrayable|null $env`

#### $logger

PioniaApplication.php : 106

Logger instance

`public LoggerInterface|null $logger`

#### $unResolvedAppProviders

PioniaApplication.php : 100

Resolved cached providers are cached, if the provider is not found in caches, then we resolve it as new, and cache for later requests

`public Arrayable|null $unResolvedAppProviders = null`

#### $applicationType

PioniaApplication.php : 80

Application type

`protected PioniaApplicationType|null $applicationType = \Pionia\Utils\PioniaApplicationType::REST`

#### $booted

PioniaApplication.php : 136
`protected bool $booted = false`

#### $bootedCallbacks

PioniaApplication.php : 123

The booted callbacks

`protected array<string|int, mixed> $bootedCallbacks = []`

#### $bootingCallbacks

PioniaApplication.php : 141

The booting callbacks, callbacks to call before the app runs

`protected array<string|int, mixed> $bootingCallbacks = []`

#### $cacheAdaptor

PioniaApplication.php : 143
`protected PioniaCacheAdaptor|null $cacheAdaptor = null`

#### $envResolver

PioniaApplication.php : 112

Environment resolver

`protected EnvResolver|null $envResolver`

#### $macros

Microable.php : 14
`protected static array<string|int, mixed> $macros = []`

#### $terminatedCallbacks

PioniaApplication.php : 132

The terminated callbacks, run after terminating the application

`protected array<string|int, mixed> $terminatedCallbacks = []`

#### $terminatingCallbacks

PioniaApplication.php : 128

The terminating callbacks, run before terminating the application

`protected array<string|int, mixed> $terminatingCallbacks = []`

#### $APP_NAME

AppHelpersTrait.php : 7
`private string $APP_NAME = 'Pionia'`

#### $cacheInstance

Cacheable.php : 19

The cache instance to use for caching.

`private PioniaCache|null $cacheInstance = null`

#### $version

AppHelpersTrait.php : 9
`private string $version = '2.0.0'`

### Methods

#### __call()

Microable.php : 101

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()

Microable.php : 75

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

#### __construct()

PioniaApplication.php : 148

PioniaApplication constructor.

`public __construct([string $applicationPath = __DIR__ ]) : mixed`

##### Parameters

$applicationPath : string = __DIR__

#### addAlias()

PioniaApplication.php : 854

Adds an alias to the context list of aliases

`public addAlias(string $aliasName, mixed $aliasValue) : static`

##### Parameters

$aliasName : string
$aliasValue : mixed

##### Return values

static

#### addAppProvider()

PioniaApplication.php : 908

Register a new provider in the app context(di) Appends the new provider into the existing array of providers

`public addAppProvider(string $provider) : static`

##### Parameters

$provider : string

##### Return values

static

#### addMiddleware()

PioniaApplication.php : 695

Add a single middleware to the chain

`public addMiddleware(string $middleware) : $this`

##### Parameters

$middleware : string

##### Return values

$this

#### addQueryToPool()

PioniaApplication.php : 372
`public addQueryToPool(string $identifier, string $query) : static`

##### Parameters

$identifier : string
$query : string

##### Return values

static

#### alias()

PioniaApplication.php : 866

Get any alias from the context

`public alias(string $aliasName[, mixed|null $default = null ]) : mixed`

##### Parameters

$aliasName : string
$default : mixed|null = null

#### allowedOrigins()

PioniaApplication.php : 819

If set, these shall be the only addresses that can access the application

`public allowedOrigins(array<string|int, mixed> $addresses) : $this`

##### Parameters

$addresses : array<string|int, mixed>

##### Return values

$this

#### appName()

AppHelpersTrait.php : 15

Our application name

`public appName() : string`

##### Return values

string

#### appRoot()

PathsTrait.php : 32

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

#### blockedOrigins()

PioniaApplication.php : 831

If set, these origins shall be prevented from accessing the application

`public blockedOrigins(array<string|int, mixed> $origins) : $this`

##### Parameters

$origins : array<string|int, mixed>

##### Return values

$this

#### bootConsole()

PioniaApplication.php : 635
`public bootConsole([string|null $name = 'Pionia Framework' ]) : int`

##### Parameters

$name : string|null = 'Pionia Framework'

##### Tags

throws
  Exception

##### Return values

int

#### booted()

ApplicationLifecycleHooks.php : 19

Register callbacks to be run after the application is booted This method can be called multiple times to add more hooks

`public booted(Closure $closure) : static`

Hooks here have access to the application instance

##### Parameters

$closure : Closure

##### Return values

static

#### booting()

ApplicationLifecycleHooks.php : 34

Register hooks to mutate the application booting cycle.

`public booting(Closure $callback) : $this`

Runs before the application is booted Can be called multiple times to add more hooks.

All hooks here do not have access to the application instance

##### Parameters

$callback : Closure

##### Return values

$this

#### bootstrapCommandsFromProviders()

PioniaApplication.php : 412

Collect commands from app providers

`public bootstrapCommandsFromProviders(Arrayable $commands) : Arrayable`

##### Parameters

$commands : Arrayable

##### Return values

Arrayable

#### cache()

Cacheable.php : 53

Caches the value if the value is not null.

`public cache(string $key[, mixed $value = null ][, mixed $ttl = null ][, bool|null $exact = false ]) : bool|mixed`

##### Parameters

$key : string

  The key to cache

$value : mixed = null

  The value to cache

$ttl : mixed = null

  The time to live for the cache

$exact : bool|null = false

  If passed, the key won't be parsed at all, it will be cached as is.

##### Return values

bool|mixed

#### ClearByKeys()

Cacheable.php : 205

Clear the cache.

`public ClearByKeys(array<string|int, mixed> $keys[, bool|null $exact = false ]) : bool`

##### Parameters

$keys : array<string|int, mixed>

  The keys to clear

$exact : bool|null = false

  If passed, the keys won't be parsed at all

##### Return values

bool

#### contextArrAdd()

Containable.php : 117
`public contextArrAdd(string $contextKey, array<string|int, mixed> $dataToAdd) : void`

##### Parameters

$contextKey : string
$dataToAdd : array<string|int, mixed>

#### contextHas()

Containable.php : 33

Check if a value exists in the container

`public contextHas(string $key) : bool`

##### Parameters

$key : string

##### Return values

bool

#### contextMake()

Containable.php : 92

Make an instance of a class from the container. This will throw an exception if the class is not found

`public contextMake(string $name[, array<string|int, mixed> $parameters = [] ]) : mixed`

##### Parameters

$name : string
$parameters : array<string|int, mixed> = []

##### Tags

throws
  DependencyException
throws
  NotFoundException

#### contextMakeSilently()

Containable.php : 103

Create an instance of a class without throwing an exception when it fails

`public contextMakeSilently(string $name[, array<string|int, mixed> $parameters = [] ]) : mixed`

##### Parameters

$name : string
$parameters : array<string|int, mixed> = []

#### ddInfo()

AppDatabaseHelper.php : 30

Return everything about database connections discovered

`public ddInfo() : Arrayable`

##### Return values

Arrayable

#### defaultOrFirst()

AppDatabaseHelper.php : 43

Get a database connection from the pool of connections we have

`public defaultOrFirst([string|null $name = null ]) : mixed`

If a name is passed, then we try to grab that name

##### Parameters

$name : string|null = null

##### Tags

throws
  Throwable

#### deleteCache()

Cacheable.php : 130

Delete the cache for the key.

`public deleteCache(string $key[, bool $exact = false ]) : bool`

##### Parameters

$key : string

  The key to delete

$exact : bool = false

  If passed, the key won't be parsed at all

##### Return values

bool

#### dispatch()

PioniaApplication.php : 796

Dispatches an event from anywhere in the application

`public dispatch(object $event, string $name) : void`

##### Parameters

$event : object
$name : string

#### environment()

AppHelpersTrait.php : 62
`public environment() : string`

##### Return values

string

#### envPath()

PathsTrait.php : 50
`public envPath([string|null $path = null ]) : string`

##### Parameters

$path : string|null = null

##### Return values

string

#### flushMacros()

Microable.php : 61

Remove all the macros we had registered

`public static flushMacros() : void`

#### formatCommandString()

PioniaApplication.php : 785

Format the given command as a fully-qualified executable command.

`public static formatCommandString(string $string) : string`

##### Parameters

$string : string

##### Return values

string

#### getAppName()

PioniaApplication.php : 211
`public getAppName() : mixed`

#### getCache()

Cacheable.php : 84
`public getCache( $key[, bool|null $exact = false ]) : mixed`

##### Parameters

$key :
$exact : bool|null = false

#### getCacheInstance()

Cacheable.php : 221
`public getCacheInstance() : PioniaCache|null`

##### Return values

PioniaCache|null

#### getDirFor()

PathsTrait.php : 62

Get the directory for a given alias

`public getDirFor(string $aliasName) : string|null`

##### Parameters

$aliasName : string

##### Return values

string|null

#### getDiscoveredConnections()

AppDatabaseHelper.php : 14

Get the discovered database connections that are available in our environment

`public getDiscoveredConnections() : Arrayable`

##### Return values

Arrayable

#### getEnv()

PioniaApplication.php : 266

Get all the environment variables or the value of a single key Will check in the $_ENV, $_SERVER, container, and in the local env array for the same key, other will return all

`public getEnv([string|null $key = null ][, mixed $default = null ]) : PioniaApplicationType`

##### Parameters

$key : string|null = null
$default : mixed = null

##### Return values

PioniaApplicationType

#### getOrDefault()

Containable.php : 65

Get a value from the container or return a default value

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

##### Parameters

$key : string
$default : mixed

#### getOrFail()

Containable.php : 82

Get a value from the container or throw an exception.

`public getOrFail(string $key) : mixed`

##### Parameters

$key : string

##### Tags

see
  PioniaApplication::resolve()

  for similar functionality on the application instance

throws
  ContainerExceptionInterface
throws
  DependencyException
throws
  NotFoundException
throws
  NotFoundExceptionInterface

#### getSilently()

Containable.php : 50

Get a value from the container or return null instead of throwing an exception

`public getSilently(mixed $key) : mixed`

##### Parameters

$key : mixed

#### handleRequest()

PioniaApplication.php : 805
`public handleRequest() : Response`

##### Tags

throws
  DependencyException
throws
  NotFoundException

##### Return values

Response

#### hasCache()

Cacheable.php : 183

Check if the cache has the key.

`public hasCache( $key[, bool|null $exact = false ]) : bool`

Will not throw an exception if the key is not set or the cache is not activated.

##### Parameters

$key :
$exact : bool|null = false

##### Return values

bool

#### hasMacro()

Microable.php : 53

Check if we have a method in the balonables

`public static hasMacro(string $name) : bool`

##### Parameters

$name : string

##### Return values

bool

#### httpsOnly()

PioniaApplication.php : 841

If set, only https requests shall be allowed

`public httpsOnly([bool $httpsOnly = true ]) : $this`

##### Parameters

$httpsOnly : bool = true

##### Return values

$this

#### isBooted()

PioniaApplication.php : 309

Check if the application is booted

`public isBooted() : bool`

##### Return values

bool

#### isCachedIn()

PioniaApplication.php : 590

Checks if a certain keyToCheck is set in the cache under a certain keyCached.

`public isCachedIn(string $keyCached, string $keyToCheck[, bool|null $checkExact = true ]) : bool`

This is useful if you want to check if a certain items is in a certain cached array or arrayable

Outside the app context, you can use `is_cached_in()` to achieve the same.

##### Parameters

$keyCached : string
$keyToCheck : string
$checkExact : bool|null = true

##### Return values

bool

#### isConsoleApp()

AppHelpersTrait.php : 87
`public isConsoleApp() : bool`

##### Return values

bool

#### isDebug()

AppHelpersTrait.php : 47
`public isDebug() : mixed`

#### isDevelopment()

AppHelpersTrait.php : 42
`public isDevelopment() : bool`

##### Return values

bool —

If we are in development mode

#### isLinux()

AppHelpersTrait.php : 77
`public isLinux() : bool`

##### Return values

bool

#### isMac()

AppHelpersTrait.php : 82
`public isMac() : bool`

##### Return values

bool

#### isProduction()

AppHelpersTrait.php : 52
`public isProduction() : bool`

##### Return values

bool

#### isRestApp()

AppHelpersTrait.php : 92
`public isRestApp() : bool`

##### Return values

bool

#### isTesting()

AppHelpersTrait.php : 57
`public isTesting() : bool`

##### Return values

bool

#### isWindows()

AppHelpersTrait.php : 72
`public isWindows() : bool`

##### Return values

bool

#### macro()

Microable.php : 22

Add a new mixable to the macros

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

##### Parameters

$key : string
$value :

#### make()

PioniaApplication.php : 886

Build an entry of the container by its name.

`public make(string $name[, array<string|int, mixed> $parameters = [] ]) : mixed`

This method behave like resolve() except resolves the entry again every time. For example if the entry is a class then a new instance will be created each time.

This method makes the container behave like a factory.

##### Parameters

$name : string
$parameters : array<string|int, mixed> = []

##### Tags

throws
  DependencyException
throws
  NotFoundException

#### mediaPath()

PathsTrait.php : 21

The path to the resources directory.

`public mediaPath() : string`

##### Return values

string

#### middlewareChain()

PioniaApplication.php : 723

When this is used, the closure passed must return a MiddlewareChain instance Middlewares in this chain will be added to the context and will be the only middlewares used

`public middlewareChain(Closure $closure) : $this`

##### Parameters

$closure : Closure

##### Return values

$this

#### mixin()

Microable.php : 35

Mix another object into the class.

`public static mixin(object $mixin[, bool $replace = true ]) : void`

##### Parameters

$mixin : object
$replace : bool = true

##### Tags

throws
  ReflectionException

#### os()

AppHelpersTrait.php : 67
`public os() : string`

##### Return values

string

#### php()

PioniaApplication.php : 766

Get the PHP binary.

`public static php() : string`

##### Return values

string

#### phpPath()

PathsTrait.php : 45
`public phpPath() : string`

##### Return values

string

#### phpVersion()

PathsTrait.php : 40
`public phpVersion() : string`

##### Return values

string

#### pioniaBinary()

PioniaApplication.php : 774

Get the pionia cli binary.

`public static pioniaBinary() : string`

##### Return values

string

#### powerUp()

PioniaApplication.php : 317

Boot the app

`public powerUp([PioniaApplicationType|null $type = null ]) : PioniaApplication`

##### Parameters

$type : PioniaApplicationType|null = null

##### Return values

PioniaApplication

#### prepareConsole()

PioniaApplication.php : 742

Sync the commands from the configuration and add them to the console application

`public prepareConsole() : void`

#### publicPath()

PathsTrait.php : 13

The directory where the frontend assets are stored.

`public publicPath([ $path = null ]) : string`

##### Parameters

$path : = null

##### Return values

string

#### refreshEnv()

PioniaApplication.php : 283
`public refreshEnv() : void`

#### resolve()

PioniaApplication.php : 899

Get any entry from the container by its id

`public resolve(string $id) : mixed`

This is an acronym of `getOrFail` which throws an exception if the entry is not found

##### Parameters

$id : string

##### Tags

see
  getOrFail()
throws
  DependencyException
throws
  NotFoundException

#### set()

Containable.php : 41

Set a value in the container

`public set(string $name, mixed $value) : static`

##### Parameters

$name : string
$value : mixed

##### Return values

static

#### setAppName()

AppHelpersTrait.php : 33

Change the core app name

`public setAppName( $name) : void`

##### Parameters

$name :

#### setCache()

Cacheable.php : 102
`public setCache(string $key, mixed $value[, mixed $ttl = null ][, bool|null $exact = false ]) : bool`

##### Parameters

$key : string
$value : mixed
$ttl : mixed = null
$exact : bool|null = false

##### Return values

bool

#### setCacheInstance()

Cacheable.php : 36

Set the cache instance to use for caching.

`public setCacheInstance(PioniaCache|null $cache) : void`

##### Parameters

$cache : PioniaCache|null

#### setEnv()

PioniaApplication.php : 294
`public setEnv(string $key, Arrayable|null $env[, bool|null $override = true ]) : void`

##### Parameters

$key : string
$env : Arrayable|null
$override : bool|null = true

#### setLogger()

PioniaApplication.php : 573
`public setLogger(LoggerInterface $logger) : void`

##### Parameters

$logger : LoggerInterface

#### shutdown()

ApplicationLifecycleHooks.php : 154

Shutdown the application

`public shutdown() : void`

#### supportedMethods()

PioniaApplication.php : 621
`public supportedMethods() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### terminate()

ApplicationLifecycleHooks.php : 123

Shutdown the application

`public terminate([int $status = 1 ]) : void`

##### Parameters

$status : int = 1

#### terminated()

ApplicationLifecycleHooks.php : 64

Register the application's terminated hook listeners.

`public terminated(Closure $closure) : void`

All logic that needs to run after the application is terminated Can be called multiple times to add more hooks

Hooks here do not have access to the application instance

##### Parameters

$closure : Closure

#### terminating()

ApplicationLifecycleHooks.php : 49

Register the application's terminating hooks.

`public terminating(Closure $callback) : void`

All logic that needs to run before the application is terminated Can be called multiple times to add more hooks

Hooks here have access to the application instance

##### Parameters

$callback : Closure

#### updateCache()

Cacheable.php : 71
`public updateCache(mixed $key, mixed $newValue[, mixed $exact = false ][, int|null $ttl = null ]) : void`

##### Parameters

$key : mixed
$newValue : mixed
$exact : mixed = false
$ttl : int|null = null

#### version()

AppHelpersTrait.php : 23
`public version() : string`

##### Return values

string —

The version of the application

#### welcomePageSettings()

PioniaApplication.php : 300
`public welcomePageSettings() : Arrayable`

##### Return values

Arrayable

#### withCacheAdaptor()

PioniaApplication.php : 227

Sets the Cache Adaptor the app shall use hence-forth Defaults to a filesystem adapter

`public withCacheAdaptor(callable $cacheAdaptorResolver) : $this`

All Symfony cache adaptors are supported, even a custom one can be added as long as it supports the PSR-16 CacheInterface

The callable receives both the application and the env as arguments

##### Parameters

$cacheAdaptorResolver : callable

##### Return values

$this

#### withEndPoints()

PioniaApplication.php : 661
`public withEndPoints() : PioniaApplication|null`

##### Return values

PioniaApplication|null

#### bootAuthenticationsInProviders()

PioniaApplication.php : 530

Bootstrap authentications coming from providers. This runs post internal authentications

`protected bootAuthenticationsInProviders( $authentications) : AuthenticationChain`

##### Parameters

$authentications :

##### Return values

AuthenticationChain

#### builtInAliases()

BuiltInServices.php : 46

Builtin Aliases

`protected builtInAliases() : Arrayable`

##### Return values

Arrayable

#### builtInAuthentications()

BuiltInServices.php : 37

Get the built-in services provided by the application.

`protected builtInAuthentications() : Arrayable`

##### Return values

Arrayable

#### builtInCommands()

BuiltInServices.php : 27

Get the built-in services provided by the application.

`protected builtInCommands() : Arrayable`

##### Return values

Arrayable

#### builtinDirectories()

BuiltInServices.php : 55

Builtin Aliases

`protected builtinDirectories() : Arrayable`

##### Return values

Arrayable

#### builtInMiddlewares()

BuiltInServices.php : 17

Get the built-in services provided by the application.

`protected builtInMiddlewares() : Arrayable`

##### Return values

Arrayable

#### builtinNameSpaces()

BuiltInServices.php : 60
`protected builtinNameSpaces() : Arrayable`

##### Return values

Arrayable

#### builtinProviders()

BuiltInServices.php : 65
`protected builtinProviders() : Arrayable`

##### Return values

Arrayable

#### report()

PioniaApplication.php : 626
`protected report(string $format, string $message[, array<string|int, mixed>|null $data = [] ]) : void`

##### Parameters

$format : string
$message : string
$data : array<string|int, mixed>|null = []

#### resolveProviders()

PioniaApplication.php : 948

Registers all app providers registered in the .ini files that were collected in the env

`protected resolveProviders([bool $considerCached = true ]) : PioniaApplication`

##### Parameters

$considerCached : bool = true

##### Tags

throws
  InvalidProviderException

##### Return values

PioniaApplication

#### resolveRoutesFromProviders()

PioniaApplication.php : 679
`protected resolveRoutesFromProviders(PioniaRouter $router) : PioniaRouter`

##### Parameters

$router : PioniaRouter

##### Return values

PioniaRouter

#### bootProviders()

PioniaApplication.php : 365

Runs the boot method of each provider

`private bootProviders() : void`

#### bootstrapAuthentications()

PioniaApplication.php : 490

Adds the collected auths to the context Can also cache the authentications for future use

`private bootstrapAuthentications() : void`

#### bootstrapCommands()

PioniaApplication.php : 381

Collect all the commands from the environment and the context

`private bootstrapCommands() : void`

#### bootstrapMiddlewares()

PioniaApplication.php : 429
`private bootstrapMiddlewares() : void`

#### bootstrapMiddlewaresInProviders()

PioniaApplication.php : 470

Passes the middleware chain in the app providers and caches the process

`private bootstrapMiddlewaresInProviders( $middlewares) : MiddlewareChain`

##### Parameters

$middlewares :

##### Return values

MiddlewareChain

#### calculateUnresolvedProviders()

PioniaApplication.php : 926

we only want to start resolving only new providers

`private calculateUnresolvedProviders() : Arrayable|null`

##### Return values

Arrayable|null

#### callBootedCallbacks()

ApplicationLifecycleHooks.php : 73

Run all booted callbacks

`private callBootedCallbacks() : void`

#### callBootingCallbacks()

ApplicationLifecycleHooks.php : 85

Run all booting callbacks

`private callBootingCallbacks() : void`

#### callTerminatedCallbacks()

ApplicationLifecycleHooks.php : 109

Run all terminated callbacks

`private callTerminatedCallbacks() : void`

#### callTerminatingCallbacks()

ApplicationLifecycleHooks.php : 97

Run all terminating callbacks

`private callTerminatingCallbacks() : void`

#### cleanCacheKey()

Cacheable.php : 166
`private cleanCacheKey(string $key) : string`

##### Parameters

$key : string

##### Return values

string

#### getKeyName()

Cacheable.php : 152

Converts the key to snake case and appends the current class prefix if it does not exist.

`private getKeyName(string $key) : string`

##### Parameters

$key : string

##### Return values

string

#### logger()

Cacheable.php : 226
`private logger() : LoggerInterface|null`

##### Return values

LoggerInterface|null

#### registerBaseRoutesInstance()

PioniaApplication.php : 561

Add the base routes instance to the context We shall be merging all routes to this instance

`private registerBaseRoutesInstance() : void`

#### registerCorsInstance()

PioniaApplication.php : 549

Add the cors instance to the context

`private registerCorsInstance() : void`

#### resolveLogger()

PioniaApplication.php : 199

Set up the context logger

`private resolveLogger() : $this`

##### Return values

$this

#### setDefaultCachingAdaptor()

PioniaApplication.php : 240

Set the default caching adaptor to use

`private setDefaultCachingAdaptor() : void`

## Search results