21 lines
550 B
PHP
21 lines
550 B
PHP
#!/usr/bin/env php
|
|
<?php
|
|
|
|
if (file_exists(__DIR__.'/../vendor/autoload.php')) {
|
|
require __DIR__.'/../vendor/autoload.php';
|
|
} elseif (file_exists(__DIR__.'/../../../autoload.php')) {
|
|
require __DIR__.'/../../../autoload.php';
|
|
}
|
|
|
|
use Symfony\Component\Console\Application;
|
|
|
|
$application = new Application;
|
|
|
|
foreach (glob(__DIR__.'/../src/Mremi/UrlShortener/Command/*Command.php') as $command) {
|
|
$class = sprintf('Mremi\UrlShortener\Command\%s', rtrim(basename($command), '.php'));
|
|
|
|
$application->add(new $class);
|
|
}
|
|
|
|
$application->run();
|