PHP Класс Laravel\Envoy\TaskContainer

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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