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; }
<?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']);
/** Just return how it would be parsed */ function get_params_for_url($url) { $u = Usher::get_instance(); $params = $u->match_url($url); return $params; }
<?php $u = Usher::get_instance(); # default $u->map('/:controller/:action/:id', array('id' => NULL));