/**
  * @param mixed $resource
  * @param string $controllerActionName
  * @param array $controllerArguments
  * @return Uri
  */
 protected function getPublicUri($resource, $controllerActionName, array $controllerArguments = array())
 {
     $uriBuilder = $this->resourceMapper->getControllerContext()->getUriBuilder();
     $uriBuilder->reset()->setFormat($this->format)->setCreateAbsoluteUri(true);
     $uri = $uriBuilder->uriFor($controllerActionName, array_merge($this->getResourceControllerArguments($resource), $controllerArguments), $this->controllerName, $this->packageKey, $this->subPackageKey);
     return new Uri($uri);
 }