예제 #1
0
 /**
  * Display last error
  */
 public static function DisplayError()
 {
     if (\App\Application::$debug) {
         $name = 'Default/500/Debug';
         $report = Misc\Debug::DumpSilent(self::$displayData);
     } else {
         $name = 'Default/500/Error';
         $key = Cipher\Password::Hash(microtime(true) . rand(1, 99999));
         $report = $key . \Oka\Cipher::Encrypt(serialize(self::$displayData[1]), $key, true);
     }
     $page = new Web\View($name);
     $page->exception = self::$displayData[0];
     $page->report = htmlentities($report);
     $page->render();
 }
예제 #2
0
<?php

/*
 *     ____  __
 *    / __ \/ /______ _
 *   / / / / //_/ __ `/
 *  / /_/ / ,< / /_/ /
 *  \____/_/|_|\__,_/
 *
 *  @author Ole K. Aanensen <*****@*****.**>
 *  @copyright Copyright (c) 2015, okastudios.com
 *
 */
// Imports
use Oka\Web;
use Oka\Web\Router;
/**
 * Regex syntax
 * Wildcards:
 * (.*)  mixed
 * (\w+) string
 * (\d+) int
 */
// Landing page
//Router::Get('/', 'PagesController@Landing');
//Router::Get('/', ['PagesController', 'Landing']);
Router::Get('/', function () {
    $page = new Web\View('Default/200');
    $page->render();
});