PHP Class lithium\console\Response

Inheritance: extends lithium\core\Object
Show file Open project: unionofrad/lithium Class Usage Examples

Public Properties

Property Type Description
$error resource Error stream, STDERR
$output resource Output stream, STDOUT
$status integer It should be expected that only status codes in the range of 0-255 can be properly evaluated.

Public Methods

Method Description
__construct ( array $config = [] ) : void Constructor.
__destruct ( ) : void Destructor. Closes streams.
error ( string $error ) : mixed Writes string to error stream
output ( string $output ) : mixed Writes string to output stream
styles ( array | boolean $styles = [] ) : array Handles styling output.

Method Details

__construct() public method

Constructor.
public __construct ( array $config = [] ) : void
$config array Available configuration options are: - `'output'` _resource|null_ - `'error'` _resource|null_
return void

__destruct() public method

Destructor. Closes streams.
public __destruct ( ) : void
return void

error() public method

Writes string to error stream
public error ( string $error ) : mixed
$error string
return mixed

output() public method

Writes string to output stream
public output ( string $output ) : mixed
$output string
return mixed

styles() public method

Handles styling output.
public styles ( array | boolean $styles = [] ) : array
$styles array | boolean
return array

Property Details

$error public property

Error stream, STDERR
public resource $error
return resource

$output public property

Output stream, STDOUT
public resource $output
return resource

$status public property

It should be expected that only status codes in the range of 0-255 can be properly evaluated.
See also: lithium\console\Command
public int $status
return integer