PHP Class ApiPlatform\Core\Metadata\Resource\ResourceMetadata

Author: Kévin Dunglas ([email protected])
Afficher le fichier Open project: api-platform/core Class Usage Examples

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

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() public méthode

Gets an attribute.
public getAttribute ( string $key, mixed $defaultValue = null ) : mixed
$key string
$defaultValue mixed
Résultat mixed

getAttributes() public méthode

Gets attributes.
public getAttributes ( ) : array | null
Résultat array | null

getCollectionOperationAttribute() public méthode

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
Résultat mixed

getCollectionOperations() public méthode

Gets collection operations.
public getCollectionOperations ( ) : array | null
Résultat array | null

getDescription() public méthode

Gets the description.
public getDescription ( ) : string | null
Résultat string | null

getIri() public méthode

Gets the associated IRI.
public getIri ( ) : string | null
Résultat string | null

getItemOperationAttribute() public méthode

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
Résultat mixed

getItemOperations() public méthode

Gets item operations.
public getItemOperations ( ) : array | null
Résultat array | null

getShortName() public méthode

Gets the short name.
public getShortName ( ) : string | null
Résultat string | null

withAttributes() public méthode

Returns a new instance with the given attribute.
public withAttributes ( array $attributes ) : self
$attributes array
Résultat self

withCollectionOperations() public méthode

Returns a new instance with the given collection operations.
public withCollectionOperations ( array $collectionOperations ) : self
$collectionOperations array
Résultat self

withDescription() public méthode

Returns a new instance with the given description.
public withDescription ( string $description ) : self
$description string
Résultat self

withIri() public méthode

Returns a new instance with the given IRI.
public withIri ( string $iri ) : self
$iri string
Résultat self

withItemOperations() public méthode

Returns a new instance with the given item operations.
public withItemOperations ( array $itemOperations ) : self
$itemOperations array
Résultat self

withShortName() public méthode

Returns a new instance with the given short name.
public withShortName ( string $shortName ) : self
$shortName string
Résultat self