PHP Class Resque\Commands\Command

Author: Michael Haynes ([email protected])
Inheritance: extends Symfony\Component\Console\Command\Command
Show file Open project: mjphaynes/php-resque

Protected Properties

Property Type Description
$config Config array
$configOptionMap Config to options mapping
$logger The logger instance

Public Methods

Method Description
log ( ) : boolean Helper function that passes through to logger instance
pollingConsoleOutput ( ) : boolean Should the console output be of the polling format

Protected Methods

Method Description
getConfig ( $key = null ) : mixed Returns all config items or a specific one
initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : void Initialises the command just after the input has been validated.
mergeDefinitions ( array $definitions ) : array Globally sets some input options that are available for all commands
parseConfig ( $config, $defaults ) : boolean Parses the configuration file

Method Details

getConfig() protected method

Returns all config items or a specific one
protected getConfig ( $key = null ) : mixed
return mixed

initialize() protected method

This is mainly useful when a lot of commands extends one main command where some things need to be initialised based on the input arguments and options.
protected initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : void
$input Symfony\Component\Console\Input\InputInterface An InputInterface instance
$output Symfony\Component\Console\Output\OutputInterface An OutputInterface instance
return void

log() public method

Helper function that passes through to logger instance
See also: Logger::log
public log ( ) : boolean
return boolean

mergeDefinitions() protected method

Globally sets some input options that are available for all commands
protected mergeDefinitions ( array $definitions ) : array
$definitions array List of command definitions
return array

parseConfig() protected method

Parses the configuration file
protected parseConfig ( $config, $defaults ) : boolean
return boolean

pollingConsoleOutput() public method

Should the console output be of the polling format
public pollingConsoleOutput ( ) : boolean
return boolean

Property Details

$config protected property

Config array
protected $config

$configOptionMap protected property

Config to options mapping
protected $configOptionMap

$logger protected property

The logger instance
protected $logger