Ejemplo n.º 1
0
 /**
  * Gets the absolute directory of the configuration for the app.
  *
  * @return string
  */
 public static function getConfigDir()
 {
     return Runner::getAppDir() . "/config";
 }
Ejemplo n.º 2
0
 /**
  * Gets the base template
  */
 public function getBaseTemplate()
 {
     return Runner::getTemplateDir() . "/Base.php";
 }
Ejemplo n.º 3
0
 public static function renderError5xx($code, $message)
 {
     require Runner::getTemplateDir() . "/Error5xx.php";
 }
Ejemplo n.º 4
0
<?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;
Ejemplo n.º 5
0
<?php

require "../vendor/autoload.php";
use Ragnaroq\App\Runner;
$runner = new Runner();
$runner->start();