Exemple #1
0
function saint_exception_handler($e)
{
    $l = ob_get_level();
    while ($l--) {
        ob_end_clean();
    }
    # manually attempt to close all db connections
    DBService::close();
    if (SHELL) {
        $e->log();
    } else {
        Usher::handle_error($e);
    }
    exit;
}
Exemple #2
0
<?php

# if it is in the lib, use that one, otherwise just include away
$ok = @(include_once '../lib/saint/saint.php');
if (!$ok) {
    require_once 'saint.php';
}
##################################
Usher::handle_url($_SERVER['REQUEST_URI']);
Exemple #3
0
 /**
 Just return how it would be parsed
 */
 function get_params_for_url($url)
 {
     $u = Usher::get_instance();
     $params = $u->match_url($url);
     return $params;
 }
Exemple #4
0
<?php

$u = Usher::get_instance();
# default
$u->map('/:controller/:action/:id', array('id' => NULL));