console 632B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env php
  2. <?php declare(strict_types=1);
  3. // Set up autoloader for third-party dependencies
  4. require_once __DIR__ . '/vendor/autoload.php';
  5. use Aviat\AnimeClient\Command;
  6. use ConsoleKit\Console;
  7. $_SERVER['HTTP_HOST'] = 'localhost';
  8. // -----------------------------------------------------------------------------
  9. // Start console script
  10. // -----------------------------------------------------------------------------
  11. try
  12. {
  13. (new Console([
  14. 'cache:clear' => Command\CacheClear::class,
  15. 'cache:refresh' => Command\CachePrime::class,
  16. 'lists:sync' => Command\SyncLists::class,
  17. ]))->run();
  18. }
  19. catch (\Exception $e)
  20. {
  21. }