PHP Class MaintenanceScript, testswarm

It is not the entry point however.
Since: 1.0.0
Author: Timo Tijhof
Afficher le fichier Open project: jquery/testswarm

Méthodes publiques

Méthode Description
newFromContext ( TestSwarmContext $context )
run ( )

Méthodes protégées

Méthode 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

Méthode Description
__construct ( )

Method Details

checkAtty() final protected méthode

final protected checkAtty ( ) : boolean
Résultat boolean

cliInput() protected méthode

protected cliInput ( $prefix = '> ' ) : string
Résultat string

cliInputSecret() protected méthode

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
Résultat string

displayHelp() protected méthode

protected displayHelp ( )

error() protected méthode

protected error ( $msg )

execute() abstract protected méthode

abstract protected execute ( )

getContext() final protected méthode

final protected getContext ( )

getFlag() protected méthode

protected getFlag ( $key )

getOption() protected méthode

protected getOption ( $name )

init() abstract protected méthode

abstract protected init ( )

newFromContext() public static méthode

public static newFromContext ( TestSwarmContext $context )
$context TestSwarmContext

out() protected méthode

protected out ( $text )

outRaw() protected méthode

protected outRaw ( $text )

parseCliArguments() protected méthode

protected parseCliArguments ( )

registerFlag() protected méthode

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 méthode

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 méthode

public run ( )

setDescription() final protected méthode

final protected setDescription ( $description )

timeWarningForScriptWill() protected méthode

protected timeWarningForScriptWill ( $action, $seconds = 10 )

wait() protected méthode

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