PHP 클래스 luya\base\Boot

저자: nadar
파일 보기 프로젝트 열기: luyadev/luya

공개 프로퍼티들

프로퍼티 타입 설명
$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