5c362d7e26
added route caching added helpers improved redirecting
28 lines
575 B
PHP
28 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);
|