PHP Class REBELinBLUE\Deployer\Scripts\Runner

ファイルを表示 Open project: rebelinblue/deployer Class Usage Examples

Public Methods

Method Description
__call ( string $method, array $arguments = [] ) : mixed Overloading call to undefined methods to pass them to the process object.
__construct ( string $input, array $tokens = [], boolean $script_source = self::TEMPLATE_INPUT ) Runner constructor.
appendScript ( string $script ) Append commands to the end of the script.
prependScript ( string $script ) Prepend commands to the beginning of the script.
run ( callable | null $callback = null ) : integer Runs a script locally.
setServer ( Server $server, string $private_key, string $alternative_user = null ) Sets the script to run on a remote server.

Private Methods

Method Description
wrapCommand ( string $script ) : string Wraps the command in either local or remote wrappers.

Method Details

__call() public method

Overloading call to undefined methods to pass them to the process object.
public __call ( string $method, array $arguments = [] ) : mixed
$method string
$arguments array
return mixed

__construct() public method

Runner constructor.
public __construct ( string $input, array $tokens = [], boolean $script_source = self::TEMPLATE_INPUT )
$input string
$tokens array
$script_source boolean

appendScript() public method

Append commands to the end of the script.
public appendScript ( string $script )
$script string

prependScript() public method

Prepend commands to the beginning of the script.
public prependScript ( string $script )
$script string

run() public method

Runs a script locally.
public run ( callable | null $callback = null ) : integer
$callback callable | null
return integer

setServer() public method

Sets the script to run on a remote server.
public setServer ( Server $server, string $private_key, string $alternative_user = null )
$server REBELinBLUE\Deployer\Server
$private_key string
$alternative_user string