lithium\core\ObjectDeprecated::_instance()

protected method
This method is deprecated.

Returns an instance of a class with given config. The name could be a key from the classes array, a fully-namespaced class name, or an object. Typically this method is used in _init to create the dependencies used in the current class.

Parameters

  • string|object $name

    A classes key or fully-namespaced class name.

  • array $options

    The configuration passed to the constructor.

Returns

object

Source

	protected function _instance($name, array $options = []) {
		$message  = '`' . __METHOD__ . '()` has been deprecated. ';
		$message .= 'Please use Libraries::instance(), with the 4th parameter instead.';
		trigger_error($message, E_USER_DEPRECATED);
		return Libraries::instance(null, $name, $options, $this->_classes);
	}