Files
faveo/vendor/mremi/url-shortener/bin/shortener
2025-08-02 23:14:28 +07:00

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();