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.
25 lines
970 B
PHP
25 lines
970 B
PHP
<?php
|
|
|
|
namespace jrosset\Tests;
|
|
|
|
use jrosset\CliProgram\ApplicationWithCommandMonolog;
|
|
use jrosset\CliProgram\AutoDiscovery\AutoDiscoveryDirectory;
|
|
use jrosset\CliProgram\AutoDiscovery\TAutoDiscoveryApplication;
|
|
use jrosset\CliProgram\AutoPrefix\AutoPrefixNamespaceManager;
|
|
use jrosset\CliProgram\Requirements\TRequirementsApplication;
|
|
|
|
class Application extends ApplicationWithCommandMonolog {
|
|
use TAutoDiscoveryApplication;
|
|
use TRequirementsApplication;
|
|
|
|
public function __construct (string $name = 'UNKNOWN', string $version = 'UNKNOWN') {
|
|
parent::__construct(__DIR__ . '/logs/', $name, $version);
|
|
$this->registerCommandRequirementsListener();
|
|
|
|
$spot = new AutoDiscoveryDirectory(__DIR__ . '/Commands');
|
|
$spot->getAutoPrefixManagers()->prepend(new AutoPrefixNamespaceManager('\\jrosset\\Tests\\Commands', 'test'));
|
|
|
|
$this->getAutoDiscoverySpots()->prepend($spot);
|
|
$this->addAutoDiscoveredCommands();
|
|
}
|
|
} |