Esempio n. 1
0
 /**
  * Expand controller actions to Mux object.
  *
  * @return Mux
  */
 public function expand(array $options = array(), $dynamic = false)
 {
     $this->mux = $mux = new Mux();
     $routes = $this->getActionRoutes();
     foreach ($routes as $route) {
         if ($dynamic) {
             $mux->add($route[0], array($this, $route[1]), array_merge($options, $route[2]));
         } else {
             $mux->add($route[0], array(get_class($this), $route[1]), array_merge($options, $route[2]));
         }
     }
     $mux->sort();
     return $mux;
 }
Esempio n. 2
0
 /**
  * Expand controller actions to Mux object.
  *
  * @return Mux
  */
 public function expand()
 {
     $mux = new Mux();
     $paths = $this->getActionRoutes();
     foreach ($paths as $path) {
         $mux->add($path[0], array(get_class($this), $path[1]), $path[2]);
     }
     $mux->sort();
     return $mux;
 }