Example #1
0
 /**
  * Builds the URI
  *
  * @param array $arguments optional URI arguments. Will be merged with $this->arguments with precedence to $arguments
  * @return string The URI
  * @api
  */
 public function build(array $arguments = array())
 {
     $arguments = Arrays::arrayMergeRecursiveOverrule($this->arguments, $arguments);
     $this->mergeArgumentsWithRequestArguments($arguments);
     $uri = $this->router->resolve($arguments);
     $this->lastArguments = $arguments;
     if (!$this->environment->isRewriteEnabled()) {
         $uri = 'index.php/' . $uri;
     }
     if ($this->createAbsoluteUri === TRUE) {
         $uri = $this->request->getHttpRequest()->getBaseUri() . $uri;
     }
     if ($this->section !== '') {
         $uri .= '#' . $this->section;
     }
     return $uri;
 }