HummingBirdAnimeClient/console

43 lines
1.2 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env php
2016-12-20 12:58:37 -05:00
<?php declare(strict_types=1);
if ( ! function_exists('_dir'))
{
/**
* Joins paths together. Variadic to take an
* arbitrary number of arguments
*
* @return string
*/
function _dir()
{
return implode(DIRECTORY_SEPARATOR, func_get_args());
}
}
$_SERVER['HTTP_HOST'] = 'localhost';
// Define base directories
$APP_DIR = __DIR__ . '/app/';
$SRC_DIR = __DIR__ . '/src/';
$CONF_DIR = realpath("${APP_DIR}/config/");
// Set up autoloader for third-party dependencies
require_once realpath(__DIR__ . '/vendor/autoload.php');
// Unset 'constants'
unset($APP_DIR);
unset($SRC_DIR);
unset($CONF_DIR);
// ---------------------------------------------------------------------------------------------------------------------
// Start console script
// ---------------------------------------------------------------------------------------------------------------------
$console = new \ConsoleKit\Console([
2017-03-22 11:41:25 -04:00
'cache-prime' => '\Aviat\AnimeClient\Command\CachePrime',
'cache-clear' => '\Aviat\AnimeClient\Command\CacheClear'
'clear-cache' => '\Aviat\AnimeClient\Command\CacheClear',
2017-01-27 12:35:28 -05:00
'sync-lists' => '\Aviat\AnimeClient\Command\SyncKitsuWithMal'
]);
$console->run();