XBackBone/bin/clean
Sergio Brighenti 5c362d7e26 Bug fixes
added route caching
added helpers
improved redirecting
2018-11-13 18:05:17 +01:00

29 lines
575 B
PHP

#!/usr/bin/env php
<?php
require __DIR__ . '/../vendor/autoload.php';
if (php_sapi_name() !== 'cli') {
die();
}
$action = isset($argv[1]) ? $argv[1] : 'all';
switch ($action) {
case 'cache':
cleanDirectory(__DIR__ . '/../resources/cache');
break;
case 'sessions':
cleanDirectory(__DIR__ . '/../resources/sessions');
break;
case 'all':
cleanDirectory(__DIR__ . '/../resources/cache');
cleanDirectory(__DIR__ . '/../resources/sessions');
break;
case 'help':
default:
echo 'Usage: php ' . $argv[0] . ' <cache|sessions|all|help>' . PHP_EOL;
}
exit(0);