lithium\core\Object::__construct()
Constructor. Initializes class configuration ($_config), and assigns object properties
using the _init() method, unless otherwise specified by configuration. See below for
details.
Parameters
-
array
$configThe configuration options which will be assigned to the
$_configproperty. This method accepts one configuration option:'init'boolean: Controls constructor behavior for calling the_init()method. Iffalse, the method is not called, otherwise it is. Defaults totrue.
Returns
voidSource
public function __construct(array $config = []) {
$defaults = ['init' => true];
$this->_config = $config + $defaults;
if ($this->_config['init']) {
$this->_init();
}
}