SingleTablePersister
extends AbstractEntityInheritancePersister
in package
Uses
SQLResultCasing
Persister for entities that participate in a hierarchy mapped with the SINGLE_TABLE strategy.
Tags
Table of Contents
- $class : ClassMetadata
- Metadata object that describes the mapping of the mapped entity class.
- $columnTypes : array<string|int, mixed>
- The map of column names to DBAL mapping types of all prepared columns used when INSERTing or UPDATEing an entity.
- $conn : Connection
- The underlying DBAL Connection of the used EntityManager.
- $currentPersisterContext : CachedPersisterContext
- $em : EntityManagerInterface
- The EntityManager instance.
- $platform : AbstractPlatform
- The database platform.
- $queuedInserts : mixed
- Queued inserts.
- $quotedColumns : array<string|int, mixed>
- The map of quoted column names.
- $quoteStrategy : QuoteStrategy
- The quote strategy.
- $comparisonMap : array<string, string>
- $identifierFlattener : IdentifierFlattener
- The IdentifierFlattener used for manipulating identifiers
- $insertSql : string
- The INSERT SQL statement used for entities handled by this persister.
- $limitsHandlingContext : CachedPersisterContext
- $noLimitsContext : CachedPersisterContext
- __construct() : mixed
- Initializes a new <tt>BasicEntityPersister</tt> that uses the given EntityManager and persists instances of the class described by the given ClassMetadata descriptor.
- addInsert() : void
- Adds an entity to the queued insertions.
- count() : int
- Count entities (optionally filtered by a criteria)
- delete() : bool
- Deletes a managed entity.
- executeInserts() : mixed
- Executes all queued entity insertions and returns any generated post-insert identifiers that were created as a result of the insertions.
- exists() : bool
- Checks whether the given managed entity exists in the database.
- expandCriteriaParameters() : mixed
- Expands Criteria Parameters by walking the expressions and grabbing all parameters and types from it.
- expandParameters() : mixed
- Expands the parameters from the given criteria and use the correct binding types if found.
- getClassMetadata() : ClassMetadata
- getCountSQL() : string
- Get the COUNT SQL to count entities (optionally based on a criteria)
- getInserts() : mixed
- Get all queued inserts.
- getInsertSQL() : string
- getManyToManyCollection() : array<string|int, mixed>
- Gets (sliced or full) elements of the given collection.
- getOneToManyCollection() : array<string|int, mixed>
- Returns an array with (sliced or full list) of elements in the specified collection.
- getOwningTable() : string
- Gets the name of the table that owns the column the given field is mapped to.
- getResultSetMapping() : ResultSetMapping
- Gets the ResultSetMapping used for hydration.
- getSelectConditionStatementSQL() : string
- Gets the SQL WHERE condition for matching a field with a given value.
- getSelectSQL() : string
- Gets the SELECT SQL to select one or more entities by a set of field criteria.
- getSQLColumnAlias() : string
- load() : object|null
- Loads an entity by a list of field criteria.
- loadAll() : mixed
- Loads a list of entities by a list of field criteria.
- loadById() : object|null
- Loads an entity by identifier.
- loadCriteria() : array<string|int, mixed>
- Loads Entities matching the given Criteria object.
- loadManyToManyCollection() : array<string|int, mixed>
- Loads a collection of entities of a many-to-many association.
- loadOneToManyCollection() : mixed
- Loads a collection of entities in a one-to-many association.
- loadOneToOneEntity() : object
- Loads an entity of this persister's mapped class as part of a single-valued association from another entity.
- lock() : void
- Locks all rows of this entity matching the given criteria with the specified pessimistic lock mode.
- refresh() : void
- Refreshes a managed entity.
- update() : void
- Updates a managed entity. The entity is updated according to its current changeset in the running UnitOfWork. If there is no changeset, nothing is updated.
- assignDefaultVersionValue() : void
- Retrieves the default version value which was created by the preceding INSERT statement and assigns it back in to the entities version field.
- deleteJoinTableRecords() : void
- fetchVersionValue() : mixed
- Fetches the current version value of a versioned entity.
- generateFilterConditionSQL() : mixed
- {@inheritdoc}
- getClassIdentifiersTypes() : array<string|int, string>
- getDiscriminatorColumnTableName() : string
- Gets the name of the table that contains the discriminator column.
- getInsertColumnList() : mixed
- {@inheritdoc}
- getJoinSQLForJoinColumns() : string
- Generates the appropriate join SQL for the given join column.
- getLockTablesSql() : string
- Gets the FROM and optionally JOIN conditions to lock the entity managed by this persister.
- getOrderBySQL() : string
- Gets the ORDER BY SQL snippet for ordered collections.
- getSelectColumnAssociationSQL() : string
- Gets the SQL join fragment used when selecting entities from an association.
- getSelectColumnSQL() : string
- Gets the SQL snippet of a qualified column name for the given field name.
- getSelectColumnsSQL() : mixed
- {@inheritdoc}
- getSelectConditionCriteriaSQL() : mixed
- {@inheritdoc}
- getSelectConditionDiscriminatorValueSQL() : string
- getSelectConditionSQL() : mixed
- {@inheritdoc}
- getSelectJoinColumnSQL() : string
- getSelectManyToManyJoinSQL() : string
- Gets the SQL join fragment used when selecting entities from a many-to-many association.
- getSQLTableAlias() : mixed
- {@inheritdoc}
- prepareInsertData() : array<string|int, array<string|int, mixed>>
- Prepares the data changeset of a managed entity for database insertion (initial INSERT).
- prepareUpdateData() : array<string|int, array<string|int, mixed>>
- Prepares the changeset of an entity for database insertion (UPDATE).
- switchPersisterContext() : void
- Switches persister context according to current query offset/limits
- updateTable() : void
- Performs an UPDATE statement for an entity on a specific table.
- expandToManyParameters() : array<string|int, array<string|int, mixed>>
- Expands the parameters from the given criteria and use the correct binding types if found, specialized for OneToMany or ManyToMany associations.
- extractIdentifierTypes() : array<string|int, int>|array<string|int, null>|array<string|int, string>
- getIndividualValue() : mixed
- Retrieves an individual parameter value.
- getManyToManyStatement() : Result
- getOneToManyStatement() : Result
- Builds criteria and execute SQL statement to fetch the one to many entities from.
- getSelectConditionStatementColumnSQL() : array<string|int, string>
- Builds the left-hand-side of a where condition statement.
- getTypes() : array<string|int, int>|array<string|int, null>|array<string|int, string>
- Infers field types to be used by parameter type casting.
- getValues() : array<string|int, mixed>
- Retrieves the parameters that identifies a value.
- loadArrayFromResult() : array<string|int, mixed>
- Loads an array of entities from a given DBAL statement.
- loadCollectionFromStatement() : array<string|int, mixed>
- Hydrates a collection from a given DBAL statement.
Properties
$class
Metadata object that describes the mapping of the mapped entity class.
protected
ClassMetadata
$class
$columnTypes
The map of column names to DBAL mapping types of all prepared columns used when INSERTing or UPDATEing an entity.
protected
array<string|int, mixed>
$columnTypes
= []
Tags
$conn
The underlying DBAL Connection of the used EntityManager.
protected
Connection
$conn
$currentPersisterContext
protected
CachedPersisterContext
$currentPersisterContext
$em
The EntityManager instance.
protected
EntityManagerInterface
$em
$platform
The database platform.
protected
AbstractPlatform
$platform
$queuedInserts
Queued inserts.
protected
mixed
$queuedInserts
= []
Tags
$quotedColumns
The map of quoted column names.
protected
array<string|int, mixed>
$quotedColumns
= []
Tags
$quoteStrategy
The quote strategy.
protected
QuoteStrategy
$quoteStrategy
$comparisonMap
private
static array<string, string>
$comparisonMap
= [\Doctrine\Common\Collections\Expr\Comparison::EQ => '= %s', \Doctrine\Common\Collections\Expr\Comparison::NEQ => '!= %s', \Doctrine\Common\Collections\Expr\Comparison::GT => '> %s', \Doctrine\Common\Collections\Expr\Comparison::GTE => '>= %s', \Doctrine\Common\Collections\Expr\Comparison::LT => '< %s', \Doctrine\Common\Collections\Expr\Comparison::LTE => '<= %s', \Doctrine\Common\Collections\Expr\Comparison::IN => 'IN (%s)', \Doctrine\Common\Collections\Expr\Comparison::NIN => 'NOT IN (%s)', \Doctrine\Common\Collections\Expr\Comparison::CONTAINS => 'LIKE %s', \Doctrine\Common\Collections\Expr\Comparison::STARTS_WITH => 'LIKE %s', \Doctrine\Common\Collections\Expr\Comparison::ENDS_WITH => 'LIKE %s']
$identifierFlattener
The IdentifierFlattener used for manipulating identifiers
private
IdentifierFlattener
$identifierFlattener
$insertSql
The INSERT SQL statement used for entities handled by this persister.
private
string
$insertSql
This SQL is only generated once per request, if at all.
$limitsHandlingContext
private
CachedPersisterContext
$limitsHandlingContext
$noLimitsContext
private
CachedPersisterContext
$noLimitsContext
Methods
__construct()
Initializes a new <tt>BasicEntityPersister</tt> that uses the given EntityManager and persists instances of the class described by the given ClassMetadata descriptor.
public
__construct(EntityManagerInterface $em, ClassMetadata $class) : mixed
Parameters
- $em : EntityManagerInterface
- $class : ClassMetadata
Return values
mixed —addInsert()
Adds an entity to the queued insertions.
public
addInsert(mixed $entity) : void
Parameters
- $entity : mixed
-
The entity to queue for insertion.
Return values
void —count()
Count entities (optionally filtered by a criteria)
public
count([mixed $criteria = [] ]) : int
Parameters
- $criteria : mixed = []
Return values
int —delete()
Deletes a managed entity.
public
delete(mixed $entity) : bool
Parameters
- $entity : mixed
-
The entity to delete.
Return values
bool —TRUE if the entity got deleted in the database, FALSE otherwise.
executeInserts()
Executes all queued entity insertions and returns any generated post-insert identifiers that were created as a result of the insertions.
public
executeInserts() : mixed
Return values
mixed —exists()
Checks whether the given managed entity exists in the database.
public
exists(mixed $entity[, Criteria|null $extraConditions = null ]) : bool
Parameters
- $entity : mixed
- $extraConditions : Criteria|null = null
Return values
bool —TRUE if the entity exists in the database, FALSE otherwise.
expandCriteriaParameters()
Expands Criteria Parameters by walking the expressions and grabbing all parameters and types from it.
public
expandCriteriaParameters(Criteria $criteria) : mixed
Parameters
- $criteria : Criteria
Return values
mixed —expandParameters()
Expands the parameters from the given criteria and use the correct binding types if found.
public
expandParameters(mixed $criteria) : mixed
Parameters
- $criteria : mixed
Return values
mixed —getClassMetadata()
public
getClassMetadata() : ClassMetadata
Return values
ClassMetadata —getCountSQL()
Get the COUNT SQL to count entities (optionally based on a criteria)
public
getCountSQL([mixed $criteria = [] ]) : string
Parameters
- $criteria : mixed = []
Return values
string —getInserts()
Get all queued inserts.
public
getInserts() : mixed
Return values
mixed —getInsertSQL()
public
getInsertSQL() : string
Return values
string —getManyToManyCollection()
Gets (sliced or full) elements of the given collection.
public
getManyToManyCollection(array<string|int, mixed> $assoc, mixed $sourceEntity[, mixed $offset = null ][, mixed $limit = null ]) : array<string|int, mixed>
Parameters
- $assoc : array<string|int, mixed>
- $sourceEntity : mixed
- $offset : mixed = null
- $limit : mixed = null
Return values
array<string|int, mixed> —getOneToManyCollection()
Returns an array with (sliced or full list) of elements in the specified collection.
public
getOneToManyCollection(array<string|int, mixed> $assoc, mixed $sourceEntity[, mixed $offset = null ][, mixed $limit = null ]) : array<string|int, mixed>
Parameters
- $assoc : array<string|int, mixed>
- $sourceEntity : mixed
- $offset : mixed = null
- $limit : mixed = null
Return values
array<string|int, mixed> —getOwningTable()
Gets the name of the table that owns the column the given field is mapped to.
public
getOwningTable(mixed $fieldName) : string
Parameters
- $fieldName : mixed
-
The field name.
Return values
string —The table name.
getResultSetMapping()
Gets the ResultSetMapping used for hydration.
public
getResultSetMapping() : ResultSetMapping
Return values
ResultSetMapping —getSelectConditionStatementSQL()
Gets the SQL WHERE condition for matching a field with a given value.
public
getSelectConditionStatementSQL(mixed $field, mixed $value[, mixed $assoc = null ][, mixed $comparison = null ]) : string
Parameters
- $field : mixed
- $value : mixed
- $assoc : mixed = null
- $comparison : mixed = null
Return values
string —getSelectSQL()
Gets the SELECT SQL to select one or more entities by a set of field criteria.
public
getSelectSQL(mixed $criteria[, mixed $assoc = null ][, mixed $lockMode = null ][, mixed $limit = null ][, mixed $offset = null ][, array<string|int, mixed>|null $orderBy = null ]) : string
Parameters
- $criteria : mixed
- $assoc : mixed = null
- $lockMode : mixed = null
- $limit : mixed = null
- $offset : mixed = null
- $orderBy : array<string|int, mixed>|null = null
Return values
string —getSQLColumnAlias()
public
getSQLColumnAlias(string $columnName) : string
Parameters
- $columnName : string
Return values
string —load()
Loads an entity by a list of field criteria.
public
load(array<string|int, mixed> $criteria[, mixed $entity = null ][, mixed $assoc = null ][, array<string|int, mixed> $hints = [] ][, mixed $lockMode = null ][, mixed $limit = null ][, array<string|int, mixed>|null $orderBy = null ]) : object|null
Parameters
- $criteria : array<string|int, mixed>
-
The criteria by which to load the entity.
- $entity : mixed = null
-
The entity to load the data into. If not specified, a new entity is created.
- $assoc : mixed = null
-
The association that connects the entity to load to another entity, if any.
- $hints : array<string|int, mixed> = []
-
Hints for entity creation.
- $lockMode : mixed = null
-
One of the \Doctrine\DBAL\LockMode::* constants or NULL if no specific lock mode should be used for loading the entity.
- $limit : mixed = null
-
Limit number of results.
- $orderBy : array<string|int, mixed>|null = null
-
Criteria to order by.
Return values
object|null —The loaded and managed entity instance or NULL if the entity can not be found.
loadAll()
Loads a list of entities by a list of field criteria.
public
loadAll([array<string|int, mixed> $criteria = [] ][, array<string|int, mixed>|null $orderBy = null ][, mixed $limit = null ][, mixed $offset = null ]) : mixed
Parameters
- $criteria : array<string|int, mixed> = []
- $orderBy : array<string|int, mixed>|null = null
- $limit : mixed = null
- $offset : mixed = null
Return values
mixed —loadById()
Loads an entity by identifier.
public
loadById(array<string|int, mixed> $identifier[, mixed $entity = null ]) : object|null
Parameters
- $identifier : array<string|int, mixed>
- $entity : mixed = null
-
The entity to load the data into. If not specified, a new entity is created.
Return values
object|null —The loaded and managed entity instance or NULL if the entity can not be found.
loadCriteria()
Loads Entities matching the given Criteria object.
public
loadCriteria(Criteria $criteria) : array<string|int, mixed>
Parameters
- $criteria : Criteria
Return values
array<string|int, mixed> —loadManyToManyCollection()
Loads a collection of entities of a many-to-many association.
public
loadManyToManyCollection(array<string|int, mixed> $assoc, mixed $sourceEntity, PersistentCollection $collection) : array<string|int, mixed>
Parameters
- $assoc : array<string|int, mixed>
- $sourceEntity : mixed
-
The entity that owns the collection.
- $collection : PersistentCollection
-
The collection to fill.
Return values
array<string|int, mixed> —loadOneToManyCollection()
Loads a collection of entities in a one-to-many association.
public
loadOneToManyCollection(array<string|int, mixed> $assoc, mixed $sourceEntity, PersistentCollection $collection) : mixed
Parameters
- $assoc : array<string|int, mixed>
- $sourceEntity : mixed
- $collection : PersistentCollection
-
The collection to load/fill.
Return values
mixed —loadOneToOneEntity()
Loads an entity of this persister's mapped class as part of a single-valued association from another entity.
public
loadOneToOneEntity(array<string|int, mixed> $assoc, mixed $sourceEntity[, array<string|int, mixed> $identifier = [] ]) : object
Parameters
- $assoc : array<string|int, mixed>
- $sourceEntity : mixed
-
The entity that owns the association (not necessarily the "owning side").
- $identifier : array<string|int, mixed> = []
Return values
object —The loaded and managed entity instance or NULL if the entity can not be found.
lock()
Locks all rows of this entity matching the given criteria with the specified pessimistic lock mode.
public
lock(array<string|int, mixed> $criteria, mixed $lockMode) : void
Parameters
- $criteria : array<string|int, mixed>
- $lockMode : mixed
-
One of the Doctrine\DBAL\LockMode::* constants.
Return values
void —refresh()
Refreshes a managed entity.
public
refresh(array<string|int, mixed> $id, mixed $entity[, mixed $lockMode = null ]) : void
Parameters
- $id : array<string|int, mixed>
- $entity : mixed
-
The entity to refresh.
- $lockMode : mixed = null
-
One of the \Doctrine\DBAL\LockMode::* constants or NULL if no specific lock mode should be used for refreshing the managed entity.
Return values
void —update()
Updates a managed entity. The entity is updated according to its current changeset in the running UnitOfWork. If there is no changeset, nothing is updated.
public
update(mixed $entity) : void
Parameters
- $entity : mixed
-
The entity to update.
Return values
void —assignDefaultVersionValue()
Retrieves the default version value which was created by the preceding INSERT statement and assigns it back in to the entities version field.
protected
assignDefaultVersionValue(object $entity, array<string|int, mixed> $id) : void
Parameters
- $entity : object
- $id : array<string|int, mixed>
Return values
void —deleteJoinTableRecords()
protected
deleteJoinTableRecords(array<string|int, mixed> $identifier, array<string|int, string> $types) : void
Parameters
- $identifier : array<string|int, mixed>
- $types : array<string|int, string>
Tags
Return values
void —fetchVersionValue()
Fetches the current version value of a versioned entity.
protected
fetchVersionValue(ClassMetadata $versionedClass, array<string|int, mixed> $id) : mixed
Parameters
- $versionedClass : ClassMetadata
- $id : array<string|int, mixed>
Return values
mixed —generateFilterConditionSQL()
{@inheritdoc}
protected
generateFilterConditionSQL(ClassMetadata $targetEntity, mixed $targetTableAlias) : mixed
Parameters
- $targetEntity : ClassMetadata
- $targetTableAlias : mixed
Return values
mixed —getClassIdentifiersTypes()
protected
getClassIdentifiersTypes(ClassMetadata $class) : array<string|int, string>
Parameters
- $class : ClassMetadata
Tags
Return values
array<string|int, string> —getDiscriminatorColumnTableName()
Gets the name of the table that contains the discriminator column.
protected
getDiscriminatorColumnTableName() : string
Return values
string —The table name.
getInsertColumnList()
{@inheritdoc}
protected
getInsertColumnList() : mixed
Return values
mixed —getJoinSQLForJoinColumns()
Generates the appropriate join SQL for the given join column.
protected
getJoinSQLForJoinColumns(array<string|int, array<string|int, mixed>> $joinColumns) : string
Parameters
- $joinColumns : array<string|int, array<string|int, mixed>>
-
The join columns definition of an association.
Tags
Return values
string —LEFT JOIN if one of the columns is nullable, INNER JOIN otherwise.
getLockTablesSql()
Gets the FROM and optionally JOIN conditions to lock the entity managed by this persister.
protected
getLockTablesSql(int|null $lockMode) : string
Parameters
- $lockMode : int|null
-
One of the Doctrine\DBAL\LockMode::* constants.
Return values
string —getOrderBySQL()
Gets the ORDER BY SQL snippet for ordered collections.
protected
final getOrderBySQL(array<string|int, mixed> $orderBy, string $baseTableAlias) : string
Parameters
- $orderBy : array<string|int, mixed>
- $baseTableAlias : string
Tags
Return values
string —getSelectColumnAssociationSQL()
Gets the SQL join fragment used when selecting entities from an association.
protected
getSelectColumnAssociationSQL(string $field, array<string|int, mixed> $assoc, ClassMetadata $class[, string $alias = 'r' ]) : string
Parameters
- $field : string
- $assoc : array<string|int, mixed>
- $class : ClassMetadata
- $alias : string = 'r'
Return values
string —getSelectColumnSQL()
Gets the SQL snippet of a qualified column name for the given field name.
protected
getSelectColumnSQL(string $field, ClassMetadata $class[, string $alias = 'r' ]) : string
Parameters
- $field : string
-
The field name.
- $class : ClassMetadata
-
The class that declares this field. The table this class is mapped to must own the column for the given field.
- $alias : string = 'r'
Return values
string —getSelectColumnsSQL()
{@inheritdoc}
protected
getSelectColumnsSQL() : mixed
Return values
mixed —getSelectConditionCriteriaSQL()
{@inheritdoc}
protected
getSelectConditionCriteriaSQL(Criteria $criteria) : mixed
Parameters
- $criteria : Criteria
Return values
mixed —getSelectConditionDiscriminatorValueSQL()
protected
getSelectConditionDiscriminatorValueSQL() : string
Return values
string —getSelectConditionSQL()
{@inheritdoc}
protected
getSelectConditionSQL(array<string|int, mixed> $criteria[, mixed $assoc = null ]) : mixed
Parameters
- $criteria : array<string|int, mixed>
- $assoc : mixed = null
Return values
mixed —getSelectJoinColumnSQL()
protected
getSelectJoinColumnSQL(string $tableAlias, string $joinColumnName, string $quotedColumnName, string $type) : string
Parameters
- $tableAlias : string
- $joinColumnName : string
- $quotedColumnName : string
- $type : string
Return values
string —getSelectManyToManyJoinSQL()
Gets the SQL join fragment used when selecting entities from a many-to-many association.
protected
getSelectManyToManyJoinSQL(array<string|int, mixed> $manyToMany) : string
Parameters
- $manyToMany : array<string|int, mixed>
Tags
Return values
string —getSQLTableAlias()
{@inheritdoc}
protected
getSQLTableAlias(mixed $className[, mixed $assocName = '' ]) : mixed
Parameters
- $className : mixed
- $assocName : mixed = ''
Return values
mixed —prepareInsertData()
Prepares the data changeset of a managed entity for database insertion (initial INSERT).
protected
prepareInsertData(object $entity) : array<string|int, array<string|int, mixed>>
The changeset of the entity is obtained from the currently running UnitOfWork.
The default insert data preparation is the same as for updates.
Parameters
- $entity : object
-
The entity for which to prepare the data.
Tags
Return values
array<string|int, array<string|int, mixed>> —The prepared data for the tables to update.
prepareUpdateData()
Prepares the changeset of an entity for database insertion (UPDATE).
protected
prepareUpdateData(object $entity) : array<string|int, array<string|int, mixed>>
The changeset is obtained from the currently running UnitOfWork.
During this preparation the array that is passed as the second parameter is filled with
<columnName> =>
Example:
array(
'foo_table' => array('column1' => 'value1', 'column2' => 'value2', ...),
'bar_table' => array('columnX' => 'valueX', 'columnY' => 'valueY', ...),
...
)
Parameters
- $entity : object
-
The entity for which to prepare the data.
Tags
Return values
array<string|int, array<string|int, mixed>> —The prepared data.
switchPersisterContext()
Switches persister context according to current query offset/limits
protected
switchPersisterContext(int|null $offset, int|null $limit) : void
This is due to the fact that to-many associations cannot be fetch-joined when a limit is involved
Parameters
- $offset : int|null
- $limit : int|null
Return values
void —updateTable()
Performs an UPDATE statement for an entity on a specific table.
protected
final updateTable(object $entity, string $quotedTableName, array<string|int, mixed> $updateData[, bool $versioned = false ]) : void
The UPDATE can optionally be versioned, which requires the entity to have a version field.
Parameters
- $entity : object
-
The entity object being updated.
- $quotedTableName : string
-
The quoted name of the table to apply the UPDATE on.
- $updateData : array<string|int, mixed>
-
The map of columns to update (column => value).
- $versioned : bool = false
-
Whether the UPDATE should be versioned.
Tags
Return values
void —expandToManyParameters()
Expands the parameters from the given criteria and use the correct binding types if found, specialized for OneToMany or ManyToMany associations.
private
expandToManyParameters(array<string|int, array<string|int, mixed>> $criteria) : array<string|int, array<string|int, mixed>>
Parameters
- $criteria : array<string|int, array<string|int, mixed>>
-
an array of arrays containing following:
- field to which each criterion will be bound
- value to be bound
- class to which the field belongs to
Tags
Return values
array<string|int, array<string|int, mixed>> —extractIdentifierTypes()
private
extractIdentifierTypes(array<string|int, mixed> $id, ClassMetadata $versionedClass) : array<string|int, int>|array<string|int, null>|array<string|int, string>
Parameters
- $id : array<string|int, mixed>
- $versionedClass : ClassMetadata
Tags
Return values
array<string|int, int>|array<string|int, null>|array<string|int, string> —getIndividualValue()
Retrieves an individual parameter value.
private
getIndividualValue(mixed $value) : mixed
Parameters
- $value : mixed
Return values
mixed —getManyToManyStatement()
private
getManyToManyStatement(array<string|int, mixed> $assoc, object $sourceEntity[, int|null $offset = null ][, int|null $limit = null ]) : Result
Parameters
- $assoc : array<string|int, mixed>
- $sourceEntity : object
- $offset : int|null = null
- $limit : int|null = null
Tags
Return values
Result —getOneToManyStatement()
Builds criteria and execute SQL statement to fetch the one to many entities from.
private
getOneToManyStatement(array<string|int, mixed> $assoc, object $sourceEntity[, int|null $offset = null ][, int|null $limit = null ]) : Result
Parameters
- $assoc : array<string|int, mixed>
- $sourceEntity : object
- $offset : int|null = null
- $limit : int|null = null
Tags
Return values
Result —getSelectConditionStatementColumnSQL()
Builds the left-hand-side of a where condition statement.
private
getSelectConditionStatementColumnSQL(string $field[, array<string|int, mixed>|null $assoc = null ]) : array<string|int, string>
Parameters
- $field : string
- $assoc : array<string|int, mixed>|null = null
Tags
Return values
array<string|int, string> —getTypes()
Infers field types to be used by parameter type casting.
private
getTypes(string $field, mixed $value, ClassMetadata $class) : array<string|int, int>|array<string|int, null>|array<string|int, string>
Parameters
- $field : string
- $value : mixed
- $class : ClassMetadata
Tags
Return values
array<string|int, int>|array<string|int, null>|array<string|int, string> —getValues()
Retrieves the parameters that identifies a value.
private
getValues(mixed $value) : array<string|int, mixed>
Parameters
- $value : mixed
Return values
array<string|int, mixed> —loadArrayFromResult()
Loads an array of entities from a given DBAL statement.
private
loadArrayFromResult(array<string|int, mixed> $assoc, Result $stmt) : array<string|int, mixed>
Parameters
- $assoc : array<string|int, mixed>
- $stmt : Result
Return values
array<string|int, mixed> —loadCollectionFromStatement()
Hydrates a collection from a given DBAL statement.
private
loadCollectionFromStatement(array<string|int, mixed> $assoc, Result $stmt, PersistentCollection $coll) : array<string|int, mixed>
Parameters
- $assoc : array<string|int, mixed>
- $stmt : Result
- $coll : PersistentCollection