config('qoob/app/config.ini.php'); //______________________________________________________________________________ // add routes // closure style callbacks $qoob->route('GET /', function() { echo '
this is the default page.
'; }); $qoob->route('GET /home/:sometime', function($args) { echo 'this is the home method.
'.print_r($args, true).''; }); // class->method style callbacks (using namespaces) $qoob->route('GET /things/going', 'app\test->blah'); $qoob->route('GET /date/:month/:day/:year', 'app\test->dating'); $qoob->route('GET /static', 'app\test::staticMethod'); // callbacks with different request methods (without namespaces) $qoob->route('GET /home [sync]', 'request_types->sync'); $qoob->route('GET /home [ajax]', 'request_types->ajax'); // database test $qoob->route('GET /model', 'app\test->modelTest'); // view test $qoob->route('GET /template', 'app\test->templateTest'); //error test $qoob->route('GET /error', 'app\test->errorTrap'); $qoob->route('GET /error/:type', 'app\test->errorTrap'); //______________________________________________________________________________ // execute $qoob->run(); ?>