protected _createShell ( string $className, string $shortName ) : |
||
$className | string | The class name to instantiate |
$shortName | string | The plugin-prefixed shell name |
Résultat | A shell instance. |
protected function _createShell($className, $shortName)
{
list($plugin) = pluginSplit($shortName);
$instance = new $className();
$instance->plugin = trim($plugin, '.');
return $instance;
}
/** * Create the given shell name, and set the plugin property. * * @param string $className The class name to instantiate * @param string $shortName The plugin-prefixed shell name * @return \Cake\Console\Shell A shell instance. */ protected function _createShell($className, $shortName) { $instance = parent::_createShell($className, $shortName); $webIo = new ConsoleIo(new WebConsoleOutput(), new WebConsoleOutput(), new WebConsoleInput()); $instance->io($webIo); return $instance; }