PHP Класс luya\base\Boot

Автор: nadar
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$app The application object.
$configFile The path to the config file, which returns an array containing you configuration.
$mockOnly When enabled the boot process will not return/echo something, but the variabled will contain the Application object.

Открытые методы

Метод Описание
applicationConsole ( ) : string | integer Run Cli-Application based on the provided config file.
applicationWeb ( ) : string Run Web-Application based on the provided config file.
getConfigArray ( ) : array Get the config array from the configFile path with the predefined values.
getCoreBasePath ( ) : string Returns the path to luya core files
getSapiName ( ) : string Returns the current sapi name in lower case.
run ( ) : luya\web\Application | luya\cli\Application Run the application based on the Sapi Name.
setConfigArray ( array $config ) This method allows you to directly inject a configuration array instead of using the config file method.
setYiiPath ( string $baseYiiFile ) Setter method for the base Yii file.

Приватные методы

Метод Описание
includeYii ( ) : boolean Helper method to check whether the provided Yii Base file exists, if yes include and return the file.

Описание методов

applicationConsole() публичный Метод

Run Cli-Application based on the provided config file.
public applicationConsole ( ) : string | integer
Результат string | integer

applicationWeb() публичный Метод

Run Web-Application based on the provided config file.
public applicationWeb ( ) : string
Результат string Returns the Yii Application run() method if mock is disabled. Otherwise returns void

getConfigArray() публичный Метод

Get the config array from the configFile path with the predefined values.
public getConfigArray ( ) : array
Результат array The array which will be injected into the Application Constructor.

getCoreBasePath() публичный Метод

Returns the path to luya core files
public getCoreBasePath ( ) : string
Результат string The base path to the luya core folder.

getSapiName() публичный Метод

Returns the current sapi name in lower case.
public getSapiName ( ) : string
Результат string e.g. cli or web

run() публичный Метод

Run the application based on the Sapi Name.
public run ( ) : luya\web\Application | luya\cli\Application
Результат luya\web\Application | luya\cli\Application Application objected based on the sapi name.

setConfigArray() публичный Метод

This method is commonly used when running php unit tests which do not require an additional file. php $app = new Boot(); $app->setConfigArray([ ... ]);
public setConfigArray ( array $config )
$config array The configuration array for the application.

setYiiPath() публичный Метод

Setter method for the base Yii file.
public setYiiPath ( string $baseYiiFile )
$baseYiiFile string The path to the Yii.php file.

Описание свойств

$app публичное свойство

The application object.
public $app

$configFile публичное свойство

The path to the config file, which returns an array containing you configuration.
public $configFile

$mockOnly публичное свойство

When enabled the boot process will not return/echo something, but the variabled will contain the Application object.
public $mockOnly