PHP Class Resque\Helpers\CatchOutput

Author: Michael Haynes ([email protected])
Inheritance: extends Symfony\Component\Console\Output\Output
Datei anzeigen Open project: mjphaynes/php-resque Class Usage Examples

Protected Properties

Property Type Description
$written Stored output string

Public Methods

Method Description
__construct ( integer $verbosity = self::VERBOSITY_NORMAL, boolean $decorated = true, Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter = null ) Constructor.
write ( string | array $messages, boolean $newline = false, integer $type = self::OUTPUT_RAW ) Writes a message to the output.
written ( ) : string Returns written string so far

Protected Methods

Method Description
doWrite ( string $message, boolean $newline ) Stores message in a local string

Method Details

__construct() public method

Constructor.
public __construct ( integer $verbosity = self::VERBOSITY_NORMAL, boolean $decorated = true, Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter = null )
$verbosity integer The verbosity level (one of the VERBOSITY constants in OutputInterface)
$decorated boolean Whether to decorate messages
$formatter Symfony\Component\Console\Formatter\OutputFormatterInterface Output formatter instance (null to use default OutputFormatter)

doWrite() protected method

Stores message in a local string
protected doWrite ( string $message, boolean $newline )
$message string A message to write to the output
$newline boolean Whether to add a newline or not

write() public method

Writes a message to the output.
public write ( string | array $messages, boolean $newline = false, integer $type = self::OUTPUT_RAW )
$messages string | array The message as an array of lines or a single string
$newline boolean Whether to add a newline
$type integer The type of output (one of the OUTPUT constants)

written() public method

Returns written string so far
public written ( ) : string
return string

Property Details

$written protected_oe property

Stored output string
protected $written