Ejemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     $routers = new Joy_Config_Section($this->config->application->get("files/config/router"));
     $items = $routers->getAll();
     foreach ($items as $key => $item) {
         $this->_items[] = new Joy_Router_Item($item["url"], $item["controller"], $item["action"]);
     }
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
     $routers = new Joy_Config_Section($this->config->application->get("files/config/router"));
     $items = $routers->getAll();
     foreach ($items as $key => $item) {
         $rules = array();
         $variables = array();
         $atoms = explode(DIRECTORY_SEPARATOR, trim($item["url"], DIRECTORY_SEPARATOR));
         foreach ($atoms as $atom) {
             list($rules[], $variables[]) = explode(":", $atom);
             $this->_items[$key] = array("filter" => sprintf("^\\/%s\\/", implode("\\/", $rules)), "controller" => $item["controller"], "action" => $item["action"], "variables" => $variables);
         }
     }
 }