lkt/commander

2.0.1 2023-09-04 15:25 UTC

This package is auto-updated.

Last update: 2024-05-24 12:47:19 UTC


README

This lib was designed for apps with multiple packages in a way to register Symfony console commands in an easy way.

Usage

Command registration

$command = new YourSymfonyCommand(); 
\Lkt\Commander\Commander::register($command);

Usage

In your cli.php:

\Lkt\Commander\Commander::run();

Alternatively, if not all console commands uses LKT Commander, you can get the Symfony application this way:

$application = \Lkt\Commander\Commander::getApplication();

// Your stuff...

$application->run();