__construct() public method

Constructor.
public __construct ( array $config = [] ) : void
$config array Configuration options.
return void
Example #1
0
 public function __construct(array $config = array())
 {
     $defaults = array('classes' => array(), 'compile' => true, 'extract' => true, 'paths' => array());
     parent::__construct($config + $defaults);
     // Start the hierarchy lexer
     Lexer::_init(array('hierarchy' => $this));
 }
Example #2
0
 /**
  * Renderer constructor.
  *
  * Accepts these following configuration parameters:
  * - `view`: The `View` object associated with this renderer.
  * - `strings`: String templates used by helpers.
  * - `handlers`: An array of output handlers for string template inputs.
  * - `message`: The `Message` object associated with this renderer.
  * - `context`: An array of the current rendering context data, like `content`.
  *
  * @param array $config
  */
 public function __construct(array $config = array())
 {
     $defaults = array('message' => null, 'context' => array('content' => '', 'scripts' => array(), 'styles' => array(), 'head' => array()));
     parent::__construct((array) $config + $defaults);
 }