lithium\console\Response::__construct()

public method

Constructor.

Parameters

  • array $config

    Available configuration options are:

    • 'output' resource|null
    • 'error' resource|null
    • 'color' boolean By default true.

Returns

void

Source

	public function __construct($config = []) {
		$defaults = ['output' => null, 'error' => null, 'plain' => false];
		$config += $defaults;

		$this->output = $config['output'];

		if (!is_resource($this->output)) {
			$this->output = fopen('php://stdout', 'r');
		}

		$this->error = $config['error'];

		if (!is_resource($this->error)) {
			$this->error = fopen('php://stderr', 'r');
		}
		$this->plain = $config['plain'];

		parent::__construct($config);
	}