/**
  * Creates an URI used for linking to an Controller action.
  *
  * @param string $actionName Name of the action to be called
  * @param array $controllerArguments Additional query parameters. Will be merged with $this->arguments.
  * @param string $controllerName Name of the target controller. If not set, current ControllerName is used.
  * @param string $packageKey Name of the target package. If not set, current Package is used.
  * @param string $subPackageKey Name of the target SubPackage. If not set, current SubPackage is used.
  * @return string the rendered URI
  * @api
  * @see build()
  * @author Bastian Waidelich <*****@*****.**>
  */
 public function uriFor($actionName = NULL, $controllerArguments = array(), $controllerName = NULL, $packageKey = NULL, $subPackageKey = NULL)
 {
     if ($actionName !== NULL) {
         $controllerArguments['@action'] = strtolower($actionName);
     }
     if ($controllerName !== NULL) {
         $controllerArguments['@controller'] = strtolower($controllerName);
     } else {
         $controllerArguments['@controller'] = strtolower($this->request->getControllerName());
     }
     if ($packageKey === NULL) {
         $packageKey = $this->request->getControllerPackageKey();
     }
     $controllerArguments['@package'] = strtolower($packageKey);
     if (strlen($subPackageKey) === 0) {
         $subPackageKey = $this->request->getControllerSubpackageKey();
     }
     if (strlen($subPackageKey) > 0) {
         $controllerArguments['@subpackage'] = strtolower($subPackageKey);
     }
     if ($this->format !== '') {
         $controllerArguments['@format'] = $this->format;
     }
     $this->arguments = \F3\FLOW3\Utility\Arrays::arrayMergeRecursiveOverrule($this->arguments, $controllerArguments);
     return $this->build();
 }