Class CommandFactory
This is a factory for creating Command and Shell instances.
This factory can be replaced or extended if you need to customize building your command and shell objects.
Namespace: Cake\Console
Property Summary
-
$container protected
Cake\Core\ContainerInterface|null
Method Summary
-
__construct() public
Constructor
-
create() public
The factory method for creating Command and Shell instances.
Method Detail
__construct() ¶ public
__construct(Cake\Core\ContainerInterface|null $container = null)
Constructor
Parameters
-
Cake\Core\ContainerInterface|null
$container optional The container to use if available.
create() ¶ public
create(string $className): Cake\Console\ShellCake\Console\CommandInterface
The factory method for creating Command and Shell instances.
Parameters
-
string
$className
Returns
Cake\Console\ShellCake\Console\CommandInterface