PHP Class MaintenanceScript, testswarm

It is not the entry point however.
Since: 1.0.0
Author: Timo Tijhof
显示文件 Open project: jquery/testswarm

Public Methods

Method Description
newFromContext ( TestSwarmContext $context )
run ( )

Protected Methods

Method Description
checkAtty ( ) : boolean
cliInput ( $prefix = '> ' ) : string
cliInputSecret ( $prefix = '> ', $type = 'stars' ) : string Retreive a secret value from the cli.
displayHelp ( )
error ( $msg )
execute ( )
getContext ( )
getFlag ( $key )
getOption ( $name )
init ( )
out ( $text )
outRaw ( $text )
parseCliArguments ( )
registerFlag ( $key, $type, string $description ) Register a flag, usage any of these 4: - php script.php -a -b value -c "value" -d="value"
registerOption ( $name, $type, string $description ) Register an option, usage any of these 4: - php script.php --foo --bar=value --quux="value"
setDescription ( $description )
timeWarningForScriptWill ( $action, $seconds = 10 )
wait ( $seconds, $message = '' )

Private Methods

Method Description
__construct ( )

Method Details

checkAtty() final protected method

final protected checkAtty ( ) : boolean
return boolean

cliInput() protected method

protected cliInput ( $prefix = '> ' ) : string
return string

cliInputSecret() protected method

Based on http://www.dasprids.de/blog/2008/08/22/getting-a-password-hidden-from-stdin-with-php-cli.
protected cliInputSecret ( $prefix = '> ', $type = 'stars' ) : string
return string

displayHelp() protected method

protected displayHelp ( )

error() protected method

protected error ( $msg )

execute() abstract protected method

abstract protected execute ( )

getContext() final protected method

final protected getContext ( )

getFlag() protected method

protected getFlag ( $key )

getOption() protected method

protected getOption ( $name )

init() abstract protected method

abstract protected init ( )

newFromContext() public static method

public static newFromContext ( TestSwarmContext $context )
$context TestSwarmContext

out() protected method

protected out ( $text )

outRaw() protected method

protected outRaw ( $text )

parseCliArguments() protected method

protected parseCliArguments ( )

registerFlag() protected method

Register a flag, usage any of these 4: - php script.php -a -b value -c "value" -d="value"
protected registerFlag ( $key, $type, string $description )
$description string

registerOption() protected method

Register an option, usage any of these 4: - php script.php --foo --bar=value --quux="value"
protected registerOption ( $name, $type, string $description )
$description string

run() public method

public run ( )

setDescription() final protected method

final protected setDescription ( $description )

timeWarningForScriptWill() protected method

protected timeWarningForScriptWill ( $action, $seconds = 10 )

wait() protected method

protected wait ( $seconds, $message = '' )
$seconds int