Ejemplo n.º 1
0
 /**
  * assemble(): Defined by Route interface.
  *
  * @see    Route::assemble()
  * @param  array $params
  * @param  array $options
  * @return mixed
  */
 public function assemble(array $params = null, array $options = null)
 {
    if ($this->childRoutes !== null) {
         $this->addRoutes($this->childRoutes);
         $this->childRoutes = null;
     }
     
     $uri = $this->route->assemble($params, $options)
          . parent::assemble($params, $options);
     
     return $uri;
 }
Ejemplo n.º 2
0
 /**
  * assemble(): Defined by Route interface.
  *
  * @see    Route::assemble()
  * @param  array $params
  * @param  array $options
  * @return mixed
  */
 public function assemble(array $params = array(), array $options = array())
 {
     if ($this->childRoutes !== null) {
         $this->addRoutes($this->childRoutes);
         $this->childRoutes = null;
     }
     $uri = $this->route->assemble($params, $options);
     $params = array_diff_key($params, array_flip($this->route->getAssembledParams()));
     if (!isset($options['name'])) {
         if (!$this->mayTerminate) {
             throw new Exception\RuntimeException('Part route may not terminate');
         } else {
             return $uri;
         }
     }
     $uri .= parent::assemble($params, $options);
     return $uri;
 }