PHP 클래스 NerdsAndCompany\Schematic\Console\App

Sync Craft Setups.
저자: Nerds & Company
상속: extends CConsoleApplication
파일 보기 프로젝트 열기: itmundi/schematic

공개 프로퍼티들

프로퍼티 타입 설명
$componentAliases

공개 메소드들

메소드 설명
getComponent ( string $id, boolean $createIfNull = true ) : mixed Override getComponent() so we can attach any pending events if the component is getting initialized as well as do some special logic around creating the Craft::app()->db application component.
getLanguage ( ) : string Returns the target application language.
getTimeZone ( ) : string Returns the system time zone. Note that this method cannot be in {@link AppBehavior}, because Yii will check {@link \CApplication::getTimeZone()} instead.
handleError ( integer $code, string $message, string $file, integer $line )
init ( ) Initializes the console app by creating the command runner.
isConsole ( ) : boolean Returns whether we are executing in the context on a console app.
on ( string $event, mixed $handler ) Attaches an event handler, or remembers it for later if the component has not been initialized yet.
setComponents ( $components, boolean $merge = true ) Sets the application components.
setLanguage ( string $language ) Sets the target application language.

보호된 메소드들

메소드 설명
createCommandRunner ( ) : ConsoleCommandRunner

비공개 메소드들

메소드 설명
_attachEventListeners ( string $componentId ) Attaches any pending event listeners to the newly-initialized component.
_installCraft ( ) Install Craft.
_setEditionComponents ( ) Sets the edition components.
_setSchematicComponents ( ) Sets the schematic components.

메소드 상세

createCommandRunner() 보호된 메소드

protected createCommandRunner ( ) : ConsoleCommandRunner
리턴 ConsoleCommandRunner

getComponent() 공개 메소드

Override getComponent() so we can attach any pending events if the component is getting initialized as well as do some special logic around creating the Craft::app()->db application component.
public getComponent ( string $id, boolean $createIfNull = true ) : mixed
$id string
$createIfNull boolean
리턴 mixed

getLanguage() 공개 메소드

Returns the target application language.
public getLanguage ( ) : string
리턴 string

getTimeZone() 공개 메소드

Returns the system time zone. Note that this method cannot be in {@link AppBehavior}, because Yii will check {@link \CApplication::getTimeZone()} instead.
public getTimeZone ( ) : string
리턴 string

handleError() 공개 메소드

public handleError ( integer $code, string $message, string $file, integer $line )
$code integer The level of the error raised
$message string The error message
$file string The filename that the error was raised in
$line integer The line number the error was raised at

init() 공개 메소드

Initializes the console app by creating the command runner.
public init ( )

isConsole() 공개 메소드

Returns whether we are executing in the context on a console app.
public isConsole ( ) : boolean
리턴 boolean

on() 공개 메소드

The event should be identified in a serviceHandle.eventName format. For example, if you want to add an event handler for {@link EntriesService::onSaveEntry()}, you would do this: php Craft::app()->on('entries.saveEntry', function(Event $event) { ... }); Note that the actual event name (saveEntry) does not need to include the “on”. By default, event handlers will not get attached if Craft is current in the middle of updating itself or a plugin. If you want the event to fire even in that condition, pass true to the $evenDuringUpdates argument.
public on ( string $event, mixed $handler )
$event string The event to listen for
$handler mixed The event handler

setComponents() 공개 메소드

Sets the application components.
public setComponents ( $components, boolean $merge = true )
$components
$merge boolean

setLanguage() 공개 메소드

Sets the target application language.
public setLanguage ( string $language )
$language string

프로퍼티 상세

$componentAliases 공개적으로 프로퍼티

public $componentAliases