getRequest(); // FIXME: Write and use a CLIRouter here (see classdoc) import('classes.core.PageRouter'); $router = new PageRouter(); $router->setApplication($application); $request->setRouter($router); // Initialize the locale and load generic plugins. AppLocale::initialize(); PluginRegistry::loadCategory('generic'); $this->argv = isset($argv) && is_array($argv) ? $argv : array(); if (isset($_SERVER['SERVER_NAME'])) { die('This script can only be executed from the command-line'); } $this->scriptName = isset($this->argv[0]) ? array_shift($this->argv) : ''; if (isset($this->argv[0]) && $this->argv[0] == '-h') { $this->usage(); exit(0); } } function usage() { } } ?>