lithium\console\command\Create::_instance()

protected method

Get an instance of a sub-command

Parameters

  • string $name

    the name of the sub-command to instantiate

  • array $config

Returns

object

Source

	protected function _instance($name, array $config = []) {
		if ($class = Libraries::locate('command.create', Inflector::camelize($name))) {
			$this->request->params['template'] = $this->template;

			return new $class([
				'request' => $this->request,
				'classes' => $this->_classes
			]);
		}
		return Libraries::instance(null, $name, $config, $this->_classes);
	}