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
$config
The configuration options which will be assigned to the
$_config
property. 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 = array()) {
$defaults = array('init' => true);
$this->_config = $config + $defaults;
if ($this->_config['init']) {
$this->_init();
}
}