PHP 클래스 Puli\Repository\Discovery\ResourceBinding

부터: 1.0
저자: Bernhard Schussek ([email protected])
상속: extends Puli\Discovery\Binding\AbstractBinding
파일 보기 프로젝트 열기: puli/repository 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $query, string $typeName, array $parameterValues = [], string $language = 'glob' ) Creates a new resource binding.
equals ( Puli\Discovery\Api\Binding\Binding $other )
getLanguage ( ) : string Returns the language of the query.
getQuery ( ) : string Returns the query for the resources of the binding.
getResources ( ) : Puli\Repository\Api\ResourceCollection Returns the bound resources.
setRepository ( Puli\Repository\Api\ResourceRepository $repo ) Sets the repository used to load resources.

보호된 메소드들

메소드 설명
postUnserialize ( array &$data )
preSerialize ( array &$data )

메소드 상세

__construct() 공개 메소드

A resource binding has a query that is used to retrieve the resources matched by the binding. You can pass parameters that have been defined for the type. If you pass unknown parameters, or if a required parameter is missing, an exception is thrown. All parameters that you do not set here will receive the default values set for the parameter.
public __construct ( string $query, string $typeName, array $parameterValues = [], string $language = 'glob' )
$query string The resource query.
$typeName string The type to bind against.
$parameterValues array The values of the parameters defined for the type.
$language string The language of the resource query.

equals() 공개 메소드

public equals ( Puli\Discovery\Api\Binding\Binding $other )
$other Puli\Discovery\Api\Binding\Binding

getLanguage() 공개 메소드

Returns the language of the query.
public getLanguage ( ) : string
리턴 string The query language.

getQuery() 공개 메소드

Returns the query for the resources of the binding.
public getQuery ( ) : string
리턴 string The resource query.

getResources() 공개 메소드

Returns the bound resources.
public getResources ( ) : Puli\Repository\Api\ResourceCollection
리턴 Puli\Repository\Api\ResourceCollection The bound resources.

postUnserialize() 보호된 메소드

protected postUnserialize ( array &$data )
$data array

preSerialize() 보호된 메소드

protected preSerialize ( array &$data )
$data array

setRepository() 공개 메소드

Sets the repository used to load resources.
public setRepository ( Puli\Repository\Api\ResourceRepository $repo )
$repo Puli\Repository\Api\ResourceRepository The resource repository.