PHP Класс Puli\Repository\Discovery\ResourceBinding

С версии: 1.0
Автор: Bernhard Schussek ([email protected])
Наследование: extends Puli\Discovery\Binding\AbstractBinding
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.