2025-04-08 22:36:10 +01:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
|
|
|
|
2025-04-23 23:30:51 +01:00
|
|
|
use Loom\Spinner\Command\DestroyCommand;
|
2025-04-08 23:00:21 +01:00
|
|
|
use Loom\Spinner\Command\SpinCommand;
|
2025-04-24 00:41:13 +01:00
|
|
|
use Loom\Spinner\Command\StartCommand;
|
|
|
|
use Loom\Spinner\Command\StopCommand;
|
2025-04-08 23:00:21 +01:00
|
|
|
use Symfony\Component\Console\Application;
|
|
|
|
|
2025-04-24 16:00:42 +01:00
|
|
|
$localAutoloadPath = sprintf('%s/vendor/autoload.php', dirname(__DIR__));
|
|
|
|
$installedAutoloadPath = sprintf('%s/autoload.php', dirname(__DIR__, 3));
|
|
|
|
|
|
|
|
if (file_exists($localAutoloadPath)) {
|
|
|
|
require $localAutoloadPath;
|
|
|
|
} else {
|
|
|
|
require $installedAutoloadPath;
|
|
|
|
}
|
2025-04-08 23:00:21 +01:00
|
|
|
|
|
|
|
$application = new Application('Loom Spinner');
|
|
|
|
|
2025-04-23 23:30:51 +01:00
|
|
|
$application->add(new DestroyCommand());
|
2025-04-24 00:41:13 +01:00
|
|
|
$application->add(new SpinCommand());
|
|
|
|
$application->add(new StartCommand());
|
|
|
|
$application->add(new StopCommand());
|
2025-04-08 23:00:21 +01:00
|
|
|
|
|
|
|
try {
|
|
|
|
$application->run();
|
|
|
|
} catch (\Exception $exception) {
|
2025-04-12 10:47:55 +01:00
|
|
|
die($exception->getMessage());
|
2025-04-08 23:00:21 +01:00
|
|
|
}
|