class IdentifierFlattener (View source)

The IdentifierFlattener utility now houses some of the identifier manipulation logic from unit of work, so that it can be re-used elsewhere.

Methods

__construct(UnitOfWork $unitOfWork, ClassMetadataFactory $metadataFactory)

Initializes a new IdentifierFlattener instance, bound to the given EntityManager.

mixed[]
flattenIdentifier(ClassMetadata $class, array $id)

convert foreign identifiers into scalar foreign key values to avoid object to string conversion failures.

Details

__construct(UnitOfWork $unitOfWork, ClassMetadataFactory $metadataFactory)

Initializes a new IdentifierFlattener instance, bound to the given EntityManager.

Parameters

UnitOfWork $unitOfWork
ClassMetadataFactory $metadataFactory

mixed[] flattenIdentifier(ClassMetadata $class, array $id)

convert foreign identifiers into scalar foreign key values to avoid object to string conversion failures.

Parameters

ClassMetadata $class
array $id

Return Value

mixed[]