Ejemplo n.º 1
0
 /**
  * Método que regenera el fichero de rutas
  * @throws ConfigException
  */
 public function hydrateRouting()
 {
     $this->generateRouting();
     $home = Config::getInstance()->get('home_action');
     if (NULL !== $home || $home !== '') {
         $home_params = NULL;
         foreach ($this->routing as $pattern => $params) {
             list($method, $route) = RouterHelper::extractHttpRoute($pattern);
             if (preg_match("/" . preg_quote($route, "/") . "\$/i", "/" . $home)) {
                 $home_params = $params;
             }
         }
         if (NULL !== $home_params) {
             $this->routing['/'] = $home_params;
         }
     }
 }