Puli\Repository\Api\Resource\PuliResource::getPath PHP Метод

getPath() публичный Метод

For references created with {@link createReference()}, the path returned by this method is the reference path and not the actual repository path of the referenced resource. You should use {@link getRepositoryPath()} if you want to glob the repository for a resource.
public getPath ( ) : string | null
Результат string | null The path of the resource. If the resource has no path, `null` is returned.
    public function getPath();

Usage Example

Пример #1
0
 /**
  * Return the descriptors value for the given descriptor.
  *
  * @param string $descriptor
  *
  * @return mixed
  */
 public function get($descriptor)
 {
     if (!isset($this->descriptors[$descriptor])) {
         throw new \InvalidArgumentException(sprintf('Descriptor "%s" not supported for resource "%s" of class "%s". Supported descriptors: "%s"', $descriptor, $this->resource->getPath(), get_class($this->resource), implode('", "', array_keys($this->descriptors))));
     }
     return $this->descriptors[$descriptor];
 }
All Usage Examples Of Puli\Repository\Api\Resource\PuliResource::getPath