lithium\console\command\Create::_instance PHP Method

_instance() protected method

Get an instance of a sub-command
protected _instance ( string $name, array $config = [] ) : object
$name string the name of the sub-command to instantiate
$config array
return object
    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);
    }