PHP Class ApiPlatform\Core\Hydra\Serializer\DocumentationNormalizer

Author: Kévin Dunglas ([email protected])
Inheritance: implements Symfony\Component\Serializer\Normalizer\NormalizerInterface
Datei anzeigen Open project: api-platform/core Class Usage Examples

Public Methods

Method Description
__construct ( ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface $resourceMetadataFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Core\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Core\Api\OperationMethodResolverInterface $operationMethodResolver, ApiPlatform\Core\Api\UrlGeneratorInterface $urlGenerator )
normalize ( $object, $format = null, array $context = [] )
supportsNormalization ( $data, $format = null, array $context = [] )

Private Methods

Method Description
computeDoc ( Documentation $object, array $classes ) : array Computes the documentation.
getClass ( string $resourceClass, ResourceMetadata $resourceMetadata, string $shortName, string $prefixedShortName ) : array Gets a Hydra class.
getClasses ( array $entrypointProperties, array $classes ) : array Builds the classes array.
getContext ( ) : array Builds the JSON-LD context for the API documentation.
getHydraOperation ( string $resourceClass, ResourceMetadata $resourceMetadata, string $operationName, array $operation, string $prefixedShortName, boolean $collection ) : array Gets and populates if applicable a Hydra operation.
getHydraOperations ( string $resourceClass, ResourceMetadata $resourceMetadata, string $prefixedShortName, boolean $collection ) : array Gets Hydra operations.
getHydraProperties ( string $resourceClass, ResourceMetadata $resourceMetadata, string $shortName, string $prefixedShortName ) : array Gets Hydra properties.
getProperty ( PropertyMetadata $propertyMetadata, string $propertyName, string $prefixedShortName, string $shortName ) : array Gets a property definition.
getPropertyNameCollectionFactoryContext ( ResourceMetadata $resourceMetadata ) : array Gets the context for the property name factory.
getRange ( PropertyMetadata $propertyMetadata ) : string | null Gets the range of the property.
populateEntrypointProperties ( string $resourceClass, ResourceMetadata $resourceMetadata, string $shortName, string $prefixedShortName, array &$entrypointProperties ) Populates entrypoint properties.

Method Details

__construct() public method

public __construct ( ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface $resourceMetadataFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Core\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Core\Api\OperationMethodResolverInterface $operationMethodResolver, ApiPlatform\Core\Api\UrlGeneratorInterface $urlGenerator )
$resourceMetadataFactory ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface
$propertyNameCollectionFactory ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface
$propertyMetadataFactory ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface
$resourceClassResolver ApiPlatform\Core\Api\ResourceClassResolverInterface
$operationMethodResolver ApiPlatform\Core\Api\OperationMethodResolverInterface
$urlGenerator ApiPlatform\Core\Api\UrlGeneratorInterface

normalize() public method

public normalize ( $object, $format = null, array $context = [] )
$context array

supportsNormalization() public method

public supportsNormalization ( $data, $format = null, array $context = [] )
$context array