You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
716 B
PHP
21 lines
716 B
PHP
<?php
|
|
|
|
namespace jrosset\Tests;
|
|
|
|
use jrosset\CliProgram\TAutoDiscoveryApplication;
|
|
use jrosset\CliProgram\AutoDiscoveryDirectory;
|
|
use jrosset\CliProgram\AutoPrefixNamespaceManager;
|
|
|
|
class Application extends \Symfony\Component\Console\Application {
|
|
use TAutoDiscoveryApplication;
|
|
|
|
public function __construct (string $name = 'UNKNOWN', string $version = 'UNKNOWN') {
|
|
parent::__construct($name, $version);
|
|
|
|
$spot = new AutoDiscoveryDirectory(__DIR__ . '/Commands');
|
|
$spot->getAutoPrefixManagers()->prepend(new AutoPrefixNamespaceManager('\\jrosset\\Tests\\Commands', 'test'));
|
|
|
|
$this->getAutoDiscoverySpots()->prepend($spot);
|
|
$this->addAutoDiscoveredCommands();
|
|
}
|
|
} |