lithium\core\Object::__construct()

public method

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. If false, the method is not called, otherwise it is. Defaults to true.

Returns

void

Source

	public function __construct(array $config = array()) {
		$defaults = array('init' => true);
		$this->_config = $config + $defaults;

		if ($this->_config['init']) {
			$this->_init();
		}
	}