/** * Gets the absolute directory of the configuration for the app. * * @return string */ public static function getConfigDir() { return Runner::getAppDir() . "/config"; }
/** * Gets the base template */ public function getBaseTemplate() { return Runner::getTemplateDir() . "/Base.php"; }
public static function renderError5xx($code, $message) { require Runner::getTemplateDir() . "/Error5xx.php"; }
<?php /** * Which method in which MVC set will be executed * for each defined action in this array. */ $actions = array('index' => \Ragnaroq\App\Runner::mvcAction('Home', 'index'), 'welcome' => \Ragnaroq\App\Runner::mvcAction('Example', 'greet'), 'authorize' => \Ragnaroq\App\Runner::mvcAction('OAuth2', 'authorizeCallback')); /** * Which of the previously defined actions will * be executed in each route. */ $routes = array('GET' => array('/' => $actions['index'], '/example' => $actions['welcome'], '/authorize_callback' => $actions['authorize']), 'POST' => array(), 'DELETE' => array(), 'PUT' => array(), 'OPTIONS' => array()); return $routes;
<?php require "../vendor/autoload.php"; use Ragnaroq\App\Runner; $runner = new Runner(); $runner->start();