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 = array()) {
		if ($class = Libraries::locate('command.create', Inflector::camelize($name))) {
			$this->request->params['template'] = $this->template;

			return new $class(array(
				'request' => $this->request,
				'classes' => $this->_classes
			));
		}
		return parent::_instance($name, $config);
	}