PHP 클래스 Laravel\Envoy\TaskContainer

파일 보기 프로젝트 열기: laravel/envoy 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$after array All of the "after" callbacks.
$error array All of the "error" callbacks.
$finished array All of the "finished" callbacks.
$macroOptions array All of the options for each macro.
$macroStack array The stack of macro being rendered.
$macros array All of the registered macros.
$servers array All of the registered servers.
$sharedData array All of the shared data.
$taskOptions array All of the options for each task.
$taskStack array The stack of tasks being rendered.
$tasks array All of the evaluated tasks.

공개 메소드들

메소드 설명
after ( Closure $callback ) : void Register an after-task callback.
endMacro ( ) : void Stop defining a macro.
endTask ( ) : void Stop defining a task.
error ( Closure $callback ) : void Register an error-task callback.
finished ( Closure $callback ) : void Register an finished-task callback.
getAfterCallbacks ( ) : array Get all of the after-task callbacks.
getErrorCallbacks ( ) : array Get all of the error-task callbacks.
getFinishedCallbacks ( ) : array Get all of the finished-task callbacks.
getFirstServer ( ) : string Get the first registered server IP address.
getMacro ( string $macro ) : array | null Get the given macro from the container.
getMacroOptions ( string $macro ) : array Get the macro options for the given macro.
getMacros ( ) : array Getter for macros.
getServer ( string $server ) : string | null Get the IP address for a server.
getTask ( string $task, array $macroOptions = [] ) : Task Get a Task instance by the given name.
getTaskOptions ( string $task ) : array Get the task options for the given task.
getTasks ( ) : array Getter for tasks.
hasOneServer ( ) : boolean Determine if the container only has one registered server.
import ( string $file, array $data = [] ) : void Import the given file into the container.
load ( string $__path, Compiler $__compiler, array $__data = [], boolean $__serversOnly = false ) : void Load the Envoy file into the container.
loadServers ( string $path, Compiler $compiler ) : void Silently load the Envoy file into the container.
servers ( array $servers ) : void Register the array of servers with the container.
share ( string $key, mixed $value ) : void Share the given piece of data across all tasks.
startMacro ( string $macro, array $options = [] ) : void Begin defining a macro.
startTask ( string $task, array $options = [] ) : void Begin defining a task.

보호된 메소드들

메소드 설명
getServers ( array $options ) : array Get the IP addresses of the servers specified on the options.
mergeDefaultOptions ( array $options ) : array Merge the option array over the default options.
replaceSubTasks ( ) : void Replace all of the sub tasks and trim leading spaces.
resolveImportPath ( string $file ) : string | boolean Resolve the import path for the given file.
trimSpaces ( string $value ) : string Remove the leading space from the lines of a value.
writeCompiledEnvoyFile ( Compiler $compiler, string $path, boolean $serversOnly ) : string Write the compiled Envoy file to disk.

메소드 상세

after() 공개 메소드

Register an after-task callback.
public after ( Closure $callback ) : void
$callback Closure
리턴 void

endMacro() 공개 메소드

Stop defining a macro.
public endMacro ( ) : void
리턴 void

endTask() 공개 메소드

Stop defining a task.
public endTask ( ) : void
리턴 void

error() 공개 메소드

Register an error-task callback.
public error ( Closure $callback ) : void
$callback Closure
리턴 void

finished() 공개 메소드

Register an finished-task callback.
public finished ( Closure $callback ) : void
$callback Closure
리턴 void

getAfterCallbacks() 공개 메소드

Get all of the after-task callbacks.
public getAfterCallbacks ( ) : array
리턴 array

getErrorCallbacks() 공개 메소드

Get all of the error-task callbacks.
public getErrorCallbacks ( ) : array
리턴 array

getFinishedCallbacks() 공개 메소드

Get all of the finished-task callbacks.
public getFinishedCallbacks ( ) : array
리턴 array

getFirstServer() 공개 메소드

Get the first registered server IP address.
public getFirstServer ( ) : string
리턴 string

getMacro() 공개 메소드

Get the given macro from the container.
public getMacro ( string $macro ) : array | null
$macro string
리턴 array | null

getMacroOptions() 공개 메소드

Get the macro options for the given macro.
public getMacroOptions ( string $macro ) : array
$macro string
리턴 array

getMacros() 공개 메소드

Getter for macros.
public getMacros ( ) : array
리턴 array

getServer() 공개 메소드

Get the IP address for a server.
public getServer ( string $server ) : string | null
$server string
리턴 string | null

getServers() 보호된 메소드

Get the IP addresses of the servers specified on the options.
protected getServers ( array $options ) : array
$options array
리턴 array

getTask() 공개 메소드

Get a Task instance by the given name.
public getTask ( string $task, array $macroOptions = [] ) : Task
$task string
$macroOptions array
리턴 Task

getTaskOptions() 공개 메소드

Get the task options for the given task.
public getTaskOptions ( string $task ) : array
$task string
리턴 array

getTasks() 공개 메소드

Getter for tasks.
public getTasks ( ) : array
리턴 array

hasOneServer() 공개 메소드

Determine if the container only has one registered server.
public hasOneServer ( ) : boolean
리턴 boolean

import() 공개 메소드

Import the given file into the container.
public import ( string $file, array $data = [] ) : void
$file string
$data array
리턴 void

load() 공개 메소드

Load the Envoy file into the container.
public load ( string $__path, Compiler $__compiler, array $__data = [], boolean $__serversOnly = false ) : void
$__path string
$__compiler Compiler
$__data array
$__serversOnly boolean
리턴 void

loadServers() 공개 메소드

No data is needed.
public loadServers ( string $path, Compiler $compiler ) : void
$path string
$compiler Compiler
리턴 void

mergeDefaultOptions() 보호된 메소드

Merge the option array over the default options.
protected mergeDefaultOptions ( array $options ) : array
$options array
리턴 array

replaceSubTasks() 보호된 메소드

Replace all of the sub tasks and trim leading spaces.
protected replaceSubTasks ( ) : void
리턴 void

resolveImportPath() 보호된 메소드

Resolve the import path for the given file.
protected resolveImportPath ( string $file ) : string | boolean
$file string
리턴 string | boolean

servers() 공개 메소드

Register the array of servers with the container.
public servers ( array $servers ) : void
$servers array
리턴 void

share() 공개 메소드

Share the given piece of data across all tasks.
public share ( string $key, mixed $value ) : void
$key string
$value mixed
리턴 void

startMacro() 공개 메소드

Begin defining a macro.
public startMacro ( string $macro, array $options = [] ) : void
$macro string
$options array
리턴 void

startTask() 공개 메소드

Begin defining a task.
public startTask ( string $task, array $options = [] ) : void
$task string
$options array
리턴 void

trimSpaces() 보호된 메소드

Remove the leading space from the lines of a value.
protected trimSpaces ( string $value ) : string
$value string
리턴 string

writeCompiledEnvoyFile() 보호된 메소드

Write the compiled Envoy file to disk.
protected writeCompiledEnvoyFile ( Compiler $compiler, string $path, boolean $serversOnly ) : string
$compiler Compiler
$path string
$serversOnly boolean
리턴 string

프로퍼티 상세

$after 보호되어 있는 프로퍼티

All of the "after" callbacks.
protected array $after
리턴 array

$error 보호되어 있는 프로퍼티

All of the "error" callbacks.
protected array $error
리턴 array

$finished 보호되어 있는 프로퍼티

All of the "finished" callbacks.
protected array $finished
리턴 array

$macroOptions 보호되어 있는 프로퍼티

All of the options for each macro.
protected array $macroOptions
리턴 array

$macroStack 보호되어 있는 프로퍼티

The stack of macro being rendered.
protected array $macroStack
리턴 array

$macros 보호되어 있는 프로퍼티

All of the registered macros.
protected array $macros
리턴 array

$servers 보호되어 있는 프로퍼티

All of the registered servers.
protected array $servers
리턴 array

$sharedData 보호되어 있는 프로퍼티

All of the shared data.
protected array $sharedData
리턴 array

$taskOptions 보호되어 있는 프로퍼티

All of the options for each task.
protected array $taskOptions
리턴 array

$taskStack 보호되어 있는 프로퍼티

The stack of tasks being rendered.
protected array $taskStack
리턴 array

$tasks 보호되어 있는 프로퍼티

All of the evaluated tasks.
protected array $tasks
리턴 array