Exemplo n.º 1
0
 /**
  * @return string
  */
 public function url()
 {
     $url = $this->resource->getResourceName();
     if ($this->identified) {
         $identifier = $this->resource->getIdentifier();
         if ($identifier) {
             $url = $url . '/' . $identifier;
         }
     }
     if ($this->resource->hasParentResource()) {
         $current = $this->resource->getParentResource();
         while ($current) {
             $url = $current->getResourceName() . '/' . $current->getIdentifier() . '/' . $url;
             $current = $current->getParentResource();
         }
     }
     return $this->descriptor->prefix() . '/' . $url;
 }