Arikaim
in package
Arikaim core class
Table of Contents
Properties
Methods
- __callStatic() : mixed
- Get container service
- get() : mixed
- Get item from app container
- getBasePath() : string
- Return base path.
- getConsoleRootPath() : string
- Return console root path.
- getContainer() : ContainerInterface
- Return service container object.
- getDomain() : string
- Return domain url.
- getError() : string
- Return error message
- getHost() : string
- Get host
- getPort() : string
- Get port
- getRootPath() : string
- Return root path.
- getService() : mixed
- Get item from service container
- has() : bool
- Check item exists in container
- init() : void
- Create Arikaim system. Create container services, load system routes
- isConsole() : bool
- Return true if script is run from console.
- resolveBasePath() : string
- Resolve site host
- resolveHost() : string
- Resolve site host
- response() : ResponseInterface
- Create response object
- run() : void
- Start Arikaim
- systemInit() : void
- System init
Properties
$app
Application object
public
static object
$app
$scheme
Url scheme
protected
static string|null
$scheme
Methods
__callStatic()
Get container service
public
static __callStatic(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
- $name : string
-
Service name
- $arguments : array<string|int, mixed>
-
Service params
Return values
mixed —service|null
get()
Get item from app container
public
static get(string $name) : mixed
Parameters
- $name : string
getBasePath()
Return base path.
public
static getBasePath() : string
Return values
stringgetConsoleRootPath()
Return console root path.
public
static getConsoleRootPath() : string
Return values
stringgetContainer()
Return service container object.
public
static getContainer() : ContainerInterface
Return values
ContainerInterfacegetDomain()
Return domain url.
public
static getDomain() : string
Return values
stringgetError()
Return error message
public
static getError(string $errorCode[, array<string|int, mixed> $params = [] ][, string|null $default = 'UNKNOWN_ERROR' ]) : string
Parameters
- $errorCode : string
-
Error code
- $params : array<string|int, mixed> = []
-
Erorr params
- $default : string|null = 'UNKNOWN_ERROR'
Return values
stringgetHost()
Get host
public
static getHost() : string
Return values
stringgetPort()
Get port
public
static getPort([string $prefix = ':' ]) : string
Parameters
- $prefix : string = ':'
Return values
stringgetRootPath()
Return root path.
public
static getRootPath(bool $console) : string
Parameters
- $console : bool
Return values
stringgetService()
Get item from service container
public
static getService(string $name) : mixed
Parameters
- $name : string
has()
Check item exists in container
public
static has(string $name) : bool
Parameters
- $name : string
-
Item name.
Return values
boolinit()
Create Arikaim system. Create container services, load system routes
public
static init([bool $showErrors = false ][, array<string|int, mixed>|null $config = null ]) : void
Parameters
- $showErrors : bool = false
- $config : array<string|int, mixed>|null = null
isConsole()
Return true if script is run from console.
public
static isConsole() : bool
Return values
boolresolveBasePath()
Resolve site host
public
static resolveBasePath(array<string|int, mixed> $env, string $host) : string
Parameters
- $env : array<string|int, mixed>
- $host : string
Return values
stringresolveHost()
Resolve site host
public
static resolveHost(array<string|int, mixed> $env) : string
Parameters
- $env : array<string|int, mixed>
Return values
stringresponse()
Create response object
public
static response() : ResponseInterface
Return values
ResponseInterfacerun()
Start Arikaim
public
static run([bool $showErrors = false ][, array<string|int, mixed>|null $config = null ]) : void
Parameters
- $showErrors : bool = false
- $config : array<string|int, mixed>|null = null
systemInit()
System init
public
static systemInit([bool $showErrors = false ][, bool $console = false ][, array<string|int, mixed>|null $config = null ]) : void
Parameters
- $showErrors : bool = false
- $console : bool = false
- $config : array<string|int, mixed>|null = null