public __construct ( string $name = 'UNKNOWN', string $version = 'UNKNOWN' ) | ||
$name | string | The name of the application |
$version | string | The version of the application |
use Symfony\Component\Console\Application; $app = new Application('My Console App');
use Symfony\Component\Console\Command\Command; class MyCommand extends Command { // command implementation } $app->add(new MyCommand());This code adds a new command called "MyCommand" to the Console Application. Package library: Symfony Console Component.
public __construct ( string $name = 'UNKNOWN', string $version = 'UNKNOWN' ) | ||
$name | string | The name of the application |
$version | string | The version of the application |