PHP Класс ApiPlatform\Core\Metadata\Resource\ResourceMetadata

Автор: Kévin Dunglas ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( string $shortName = null, string $description = null, string $iri = null, array $itemOperations = null, array $collectionOperations = null, array $attributes = null )
getAttribute ( string $key, mixed $defaultValue = null ) : mixed Gets an attribute.
getAttributes ( ) : array | null Gets attributes.
getCollectionOperationAttribute ( string $operationName, string $key, mixed $defaultValue = null, boolean $resourceFallback = false ) : mixed Gets a collection operation attribute, optionally fallback to a resource attribute.
getCollectionOperations ( ) : array | null Gets collection operations.
getDescription ( ) : string | null Gets the description.
getIri ( ) : string | null Gets the associated IRI.
getItemOperationAttribute ( string $operationName, string $key, mixed $defaultValue = null, boolean $resourceFallback = false ) : mixed Gets an item operation attribute, optionally fallback to a resource attribute.
getItemOperations ( ) : array | null Gets item operations.
getShortName ( ) : string | null Gets the short name.
withAttributes ( array $attributes ) : self Returns a new instance with the given attribute.
withCollectionOperations ( array $collectionOperations ) : self Returns a new instance with the given collection operations.
withDescription ( string $description ) : self Returns a new instance with the given description.
withIri ( string $iri ) : self Returns a new instance with the given IRI.
withItemOperations ( array $itemOperations ) : self Returns a new instance with the given item operations.
withShortName ( string $shortName ) : self Returns a new instance with the given short name.

Приватные методы

Метод Описание
getOperationAttribute ( array $operations = null, string $operationName, string $key, mixed $defaultValue = null, boolean $resourceFallback = false ) : mixed Gets an operation attribute, optionally fallback to a resource attribute.

Описание методов

__construct() публичный метод

public __construct ( string $shortName = null, string $description = null, string $iri = null, array $itemOperations = null, array $collectionOperations = null, array $attributes = null )
$shortName string
$description string
$iri string
$itemOperations array
$collectionOperations array
$attributes array

getAttribute() публичный метод

Gets an attribute.
public getAttribute ( string $key, mixed $defaultValue = null ) : mixed
$key string
$defaultValue mixed
Результат mixed

getAttributes() публичный метод

Gets attributes.
public getAttributes ( ) : array | null
Результат array | null

getCollectionOperationAttribute() публичный метод

Gets a collection operation attribute, optionally fallback to a resource attribute.
public getCollectionOperationAttribute ( string $operationName, string $key, mixed $defaultValue = null, boolean $resourceFallback = false ) : mixed
$operationName string
$key string
$defaultValue mixed
$resourceFallback boolean
Результат mixed

getCollectionOperations() публичный метод

Gets collection operations.
public getCollectionOperations ( ) : array | null
Результат array | null

getDescription() публичный метод

Gets the description.
public getDescription ( ) : string | null
Результат string | null

getIri() публичный метод

Gets the associated IRI.
public getIri ( ) : string | null
Результат string | null

getItemOperationAttribute() публичный метод

Gets an item operation attribute, optionally fallback to a resource attribute.
public getItemOperationAttribute ( string $operationName, string $key, mixed $defaultValue = null, boolean $resourceFallback = false ) : mixed
$operationName string
$key string
$defaultValue mixed
$resourceFallback boolean
Результат mixed

getItemOperations() публичный метод

Gets item operations.
public getItemOperations ( ) : array | null
Результат array | null

getShortName() публичный метод

Gets the short name.
public getShortName ( ) : string | null
Результат string | null

withAttributes() публичный метод

Returns a new instance with the given attribute.
public withAttributes ( array $attributes ) : self
$attributes array
Результат self

withCollectionOperations() публичный метод

Returns a new instance with the given collection operations.
public withCollectionOperations ( array $collectionOperations ) : self
$collectionOperations array
Результат self

withDescription() публичный метод

Returns a new instance with the given description.
public withDescription ( string $description ) : self
$description string
Результат self

withIri() публичный метод

Returns a new instance with the given IRI.
public withIri ( string $iri ) : self
$iri string
Результат self

withItemOperations() публичный метод

Returns a new instance with the given item operations.
public withItemOperations ( array $itemOperations ) : self
$itemOperations array
Результат self

withShortName() публичный метод

Returns a new instance with the given short name.
public withShortName ( string $shortName ) : self
$shortName string
Результат self