Example #1
0
 /**
  * Class constructor
  *
  * @param  array                   $defaults  Defaults to merge for urlFor()
  * @param  null|Horde_Route_Utils  $utils     Route utilities
  */
 public function __construct($defaults = array(), $utils = null)
 {
     $this->_defaults = $defaults;
     if ($utils === null) {
         $utils = Mad_Controller_Dispatcher::getInstance()->getRouteUtils();
     }
     $this->_utils = $utils;
 }
Example #2
0
<?php

require_once dirname(dirname(__FILE__)) . '/config/environment.php';
$dispatcher = Mad_Controller_Dispatcher::getInstance();
$dispatcher->dispatch();
Example #3
0
 /**
  * Print out all defined routes in match order, with names.
  */
 public function routes()
 {
     $dispatcher = Mad_Controller_Dispatcher::getInstance();
     $mapper = $dispatcher->getRouteMapper();
     $mapper->utils->printRoutes();
 }
Example #4
0
 /**
  * Get the controller & process the request
  */
 protected function _recognizeRoutes()
 {
     try {
         $this->controller = Mad_Controller_Dispatcher::getInstance()->recognize($this->request);
         $this->_recognized = true;
     } catch (Mad_Controller_Exception $e) {
         $this->_recognized = false;
     }
 }