PHP 인터페이스 Puli\Repository\Api\ResourceRepository

A resource repository is similar to a filesystem. It stores {@link PuliResource} objects, each of which has a path in the repository: php $resource = $repo->get('/css/style.css'); Resources may have child resources. These can be accessed with {@link listChildren()}: php $resource = $repo->get('/css'); foreach ($resource->listChildren() as $name => $resource) { ... }
부터: 1.0
저자: Bernhard Schussek ([email protected])
저자: Titouan Galopin ([email protected])
파일 보기 프로젝트 열기: puli/repository 0 사용 예제들

공개 메소드들

메소드 설명
contains ( string $query, string $language = 'glob' ) : boolean Returns whether any resources match a query.
find ( string $query, string $language = 'glob' ) : Puli\Repository\Api\ResourceCollection Returns the resources matching a query.
get ( string $path ) : Puli\Repository\Api\Resource\PuliResource Returns the resource at the given path.
getVersions ( string $path ) : VersionList Returns all versions of a resource.
hasChildren ( string $path ) : boolean Returns whether a resource has child resources.
listChildren ( string $path ) : Puli\Repository\Api\ResourceCollection Lists the child resources of a resource.

메소드 상세

contains() 공개 메소드

Returns whether any resources match a query.
public contains ( string $query, string $language = 'glob' ) : boolean
$query string A resource query.
$language string The language of the query. All implementations must support the language "glob".
리턴 boolean Returns `true` if any resources exist that match the query.

find() 공개 메소드

Returns the resources matching a query.
public find ( string $query, string $language = 'glob' ) : Puli\Repository\Api\ResourceCollection
$query string A resource query.
$language string The language of the query. All implementations must support the language "glob".
리턴 Puli\Repository\Api\ResourceCollection The resources matching the query.

get() 공개 메소드

Returns the resource at the given path.
public get ( string $path ) : Puli\Repository\Api\Resource\PuliResource
$path string The path to the resource. Must start with "/". "." and ".." segments in the path are supported.
리턴 Puli\Repository\Api\Resource\PuliResource The resource at this path.

getVersions() 공개 메소드

Returns all versions of a resource.
public getVersions ( string $path ) : VersionList
$path string The path to the resource.
리턴 Puli\Repository\Api\ChangeStream\VersionList The versions stored for this path.

hasChildren() 공개 메소드

Returns whether a resource has child resources.
public hasChildren ( string $path ) : boolean
$path string The path to the resource. Must start with "/". "." and ".." segments in the path are supported.
리턴 boolean Returns `true` if the resource has child resources.

listChildren() 공개 메소드

Lists the child resources of a resource.
public listChildren ( string $path ) : Puli\Repository\Api\ResourceCollection
$path string The path to the resource. Must start with "/". "." and ".." segments in the path are supported.
리턴 Puli\Repository\Api\ResourceCollection The child resources of the resource.