2016-04-19 13:02:50 -04:00
|
|
|
#!/usr/bin/env php
|
2016-12-20 12:58:37 -05:00
|
|
|
<?php declare(strict_types=1);
|
2016-04-19 13:02:50 -04:00
|
|
|
|
2017-03-27 10:09:45 -04:00
|
|
|
// Set up autoloader for third-party dependencies
|
|
|
|
require_once realpath(__DIR__ . '/vendor/autoload.php');
|
|
|
|
|
|
|
|
use Aviat\AnimeClient\Command;
|
2016-04-19 13:02:50 -04:00
|
|
|
|
|
|
|
$_SERVER['HTTP_HOST'] = 'localhost';
|
|
|
|
|
|
|
|
// Define base directories
|
|
|
|
$APP_DIR = __DIR__ . '/app/';
|
|
|
|
$SRC_DIR = __DIR__ . '/src/';
|
|
|
|
$CONF_DIR = realpath("${APP_DIR}/config/");
|
|
|
|
|
|
|
|
// Unset 'constants'
|
|
|
|
unset($APP_DIR);
|
|
|
|
unset($SRC_DIR);
|
|
|
|
unset($CONF_DIR);
|
|
|
|
|
2017-04-17 16:13:36 -04:00
|
|
|
// -----------------------------------------------------------------------------
|
2016-04-19 13:02:50 -04:00
|
|
|
// Start console script
|
2017-04-17 16:13:36 -04:00
|
|
|
// -----------------------------------------------------------------------------
|
2016-04-19 13:02:50 -04:00
|
|
|
$console = new \ConsoleKit\Console([
|
2017-03-27 10:09:45 -04:00
|
|
|
'cache-prime' => Command\CachePrime::class,
|
|
|
|
'cache-clear' => Command\CacheClear::class,
|
|
|
|
'clear-cache' => Command\CacheClear::class,
|
|
|
|
'sync-lists' => Command\SyncKitsuWithMal::class,
|
2016-04-19 13:02:50 -04:00
|
|
|
]);
|
|
|
|
|
|
|
|
$console->run();
|