Kahlan\Reporter\Reporter::__construct PHP Method

__construct() public method

The Constructor.
public __construct ( array $config = [] )
$config array The config array. Possible values are: - `'start' _integer_: A microtime value.
    public function __construct($config = [])
    {
        $defaults = ['start' => microtime(true)];
        $config += $defaults;
        $this->_start = $config['start'];
    }

Usage Example

Beispiel #1
0
 /**
  * The constructor.
  *
  * @param array $config The config array. Possible values are:
  *                      - `'colors' _boolean_ : If `false`, colors will be ignored.
  *                      - `'output' _resource_: The output resource.
  */
 public function __construct($config = [])
 {
     parent::__construct($config);
     $defaults = ['colors' => true, 'header' => true, 'output' => fopen('php://output', 'r')];
     $config += $defaults;
     $this->_colors = $config['colors'];
     $this->_header = $config['header'];
     $this->_output = $config['output'];
 }