Menu

## ConsoleApplication extends PioniaApplication
in package

ConsoleApplication.php : 13

### Table of Contents

#### 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
appName() : string
  Our application name
appRoot() : string
  The root folder of the application.
boot() : void
booted() : void
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.
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
php() : string
  Get the PHP binary.
phpPath() : string
phpVersion() : string
pioniaBinary() : string
  Get the pionia cli binary.
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
syncCommands() : void
  Sync the commands from the configuration and add them to the console application

### Properties

#### $appName

ConsoleApplication.php : 15
`public string $appName = 'Pionia'`

#### $appVersion

PioniaApplication.php : 37
`public string $appVersion = '2.0.0'`

#### $context

Containable.php : 20

Application container context

`public ContainerInterface|Container|null $context`

#### $env

PioniaApplication.php : 49

Environment variables

`public Arrayable|null $env`

#### $logger

PioniaApplication.php : 55

Logger instance

`public LoggerInterface|null $logger`

#### $applicationType

PioniaApplication.php : 43

Application type

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

#### $dispatcher

PioniaApplication.php : 67

Event dispatcher

`protected PioniaEventDispatcher|null $dispatcher`

#### $envResolver

PioniaApplication.php : 61

Environment resolver

`protected EnvResolver|null $envResolver`

#### $macros

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

#### $APP_NAME

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

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

Containable.php : 12
`public __construct([ContainerInterface|Container|null $context = null ]) : mixed`

##### Parameters

$context : ContainerInterface|Container|null = null

#### 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

#### boot()

ConsoleApplication.php : 17
`public boot() : void`

#### booted()

ConsoleApplication.php : 23
`public booted() : void`

#### environment()

AppHelpersTrait.php : 56
`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()

ConsoleApplication.php : 93

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

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

##### Parameters

$string : string

##### Return values

string

#### getEnv()

PioniaApplication.php : 104
`public getEnv() : Arrayable`

##### Return values

Arrayable

#### getOrDefault()

Containable.php : 51

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 : 60
`public getOrFail(mixed $key) : mixed`

##### Parameters

$key : mixed

##### Tags

throws
  ContainerExceptionInterface
throws
  NotFoundExceptionInterface

#### getSilently()

Containable.php : 36
`public getSilently(mixed $key) : mixed`

##### Parameters

$key : mixed

#### 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

#### isConsoleApp()

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

##### Return values

bool

#### isDevelopment()

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

##### Return values

bool —

If we are in development mode

#### isLinux()

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

##### Return values

bool

#### isMac()

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

##### Return values

bool

#### isProduction()

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

##### Return values

bool

#### isRestApp()

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

##### Return values

bool

#### isTesting()

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

##### Return values

bool

#### isWindows()

AppHelpersTrait.php : 66
`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 :

#### mediaPath()

PathsTrait.php : 21

The path to the resources directory.

`public mediaPath() : string`

##### Return values

string

#### 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 : 61
`public os() : string`

##### Return values

string

#### php()

ConsoleApplication.php : 74

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

ConsoleApplication.php : 82

Get the pionia cli binary.

`public static pioniaBinary() : string`

##### Return values

string

#### powerUp()

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

##### Parameters

$type : PioniaApplicationType|null = null

##### Return values

PioniaApplication

#### 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 : 109
`public refreshEnv() : void`

#### set()

Containable.php : 31

Set a value in the container

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

##### Parameters

$name : string
$value : mixed

#### setAppName()

AppHelpersTrait.php : 33

Change the core app name

`public setAppName( $name) : void`

##### Parameters

$name :

#### setLogger()

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

##### Parameters

$logger : LoggerInterface

#### shutdown()

PioniaApplication.php : 235
`public shutdown([int $status = 1 ]) : void`

##### Parameters

$status : int = 1

#### terminate()

PioniaApplication.php : 257
`public terminate() : void`

#### terminated()

ApplicationLifecycleHooks.php : 49

Register the application's terminated hook listeners.

`public terminated() : void`

All logic that needs to run after the application is terminated

#### terminating()

ApplicationLifecycleHooks.php : 37

Regester the application's terminating hook listeners.

`public terminating() : void`

All logic that needs to run before the application is terminated

#### version()

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

##### Return values

string —

The version of the application

#### contextHas()

Containable.php : 23
`protected contextHas(string $key) : bool`

##### Parameters

$key : string

##### Return values

bool

#### report()

PioniaApplication.php : 229
`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()

PioniaApplication.php : 168
`private attemptToConnectToAnyDbAvailable() : void`

#### bootstrapAuthentications()

PioniaApplication.php : 183
`private bootstrapAuthentications() : void`

#### bootstrapCommands()

PioniaApplication.php : 204
`private bootstrapCommands() : void`

##### Tags

throws
  ContainerExceptionInterface
throws
  NotFoundExceptionInterface

#### bootstrapMiddlewares()

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

#### syncCommands()

ConsoleApplication.php : 49

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

`private syncCommands() : void`

## Search results