메소드 |
설명 |
|
__construct ( EntityManager $em ) |
Initializes a new UnitOfWork instance, bound to the given EntityManager. |
|
addToIdentityMap ( object $entity ) : boolean |
INTERNAL:
Registers an entity in the identity map. |
|
clear ( ) |
Clears the UnitOfWork. |
|
clearEntityChangeSet ( string $oid ) |
INTERNAL:
Clears the property changeset of the entity with the given OID. |
|
commit ( ) |
Commits the UnitOfWork, executing all operations that have been postponed
up to this point. The state of all managed entities will be synchronized with
the database. |
|
computeChangeSet ( Doctrine\ORM\Mapping\ClassMetadata $class, object $entity ) |
Computes the changes that happened to a single entity. |
|
computeChangeSets ( ) |
Computes all the changes that have been done to entities and collections
since the last commit and stores these changes in the _entityChangeSet map
temporarily for access by the persisters, until the UoW commit is finished. |
|
containsIdHash ( string $idHash, string $rootClassName ) : boolean |
INTERNAL:
Checks whether an identifier hash exists in the identity map. |
|
createEntity ( string $className, array $data, array &$hints = [] ) : object |
INTERNAL:
Creates an entity. Used for reconstitution of persistent entities. |
|
detach ( object $entity ) |
Detaches an entity from the persistence management. It's persistence will
no longer be managed by Doctrine. |
|
getByIdHash ( string $idHash, string $rootClassName ) : object |
INTERNAL:
Gets an entity in the identity map by its identifier hash. |
|
getCollectionPersister ( array $association ) : AbstractCollectionPersister |
Gets a collection persister for a collection-valued association. |
|
getCommitOrderCalculator ( ) : Doctrine\ORM\Internal\CommitOrderCalculator |
Gets the CommitOrderCalculator used by the UnitOfWork to order commits. |
|
getEntityChangeSet ( $entity ) : array |
Gets the changeset for an entity. |
|
getEntityIdentifier ( object $entity ) : array |
Gets the identifier of an entity. |
|
getEntityPersister ( string $entityName ) : Doctrine\ORM\Persister\AbstractEntityPersister |
Gets the EntityPersister for an Entity. |
|
getEntityState ( object $entity, integer $assume = null ) : integer |
Gets the state of an entity with regard to the current unit of work. |
|
getIdentityMap ( ) : array |
Gets the identity map of the UnitOfWork. |
|
getOriginalEntityData ( object $entity ) : array |
Gets the original data of an entity. The original data is the data that was
present at the time the entity was reconstituted from the database. |
|
getScheduledCollectionDeletions ( ) : array |
Get the currently scheduled complete collection deletions |
|
getScheduledCollectionUpdates ( ) : array |
Gets the currently scheduled collection inserts, updates and deletes. |
|
getScheduledEntityDeletions ( ) : array |
Gets the currently scheduled entity deletions in this UnitOfWork. |
|
getScheduledEntityInsertions ( ) : array |
Gets the currently scheduled entity insertions in this UnitOfWork. |
|
getScheduledEntityUpdates ( ) : array |
Gets the currently scheduled entity updates in this UnitOfWork. |
|
hasPendingInsertions ( ) : boolean |
Checks whether the UnitOfWork has any pending insertions. |
|
isCollectionScheduledForDeletion ( Doctrine\ORM\PersistentCollection $coll ) |
|
|
isEntityScheduled ( $entity ) : boolean |
Checks whether an entity is scheduled for insertion, update or deletion. |
|
isInIdentityMap ( object $entity ) : boolean |
Checks whether an entity is registered in the identity map of this UnitOfWork. |
|
isScheduledForDelete ( object $entity ) : boolean |
Checks whether an entity is registered as removed/deleted with the unit
of work. |
|
isScheduledForDirtyCheck ( $entity ) |
|
|
isScheduledForInsert ( object $entity ) : boolean |
Checks whether an entity is scheduled for insertion. |
|
isScheduledForUpdate ( object $entity ) : boolean |
Checks whether an entity is registered as dirty in the unit of work. |
|
loadCollection ( Doctrine\ORM\PersistentCollection $collection ) |
Initializes (loads) an uninitialized persistent collection of an entity. |
|
lock ( object $entity, integer $lockMode, integer $lockVersion = null ) |
Acquire a lock on the given entity. |
|
merge ( object $entity ) : object |
Merges the state of the given detached entity into this UnitOfWork. |
|
persist ( object $entity ) |
Persists an entity as part of the current unit of work. |
|
propertyChanged ( object $entity, string $propertyName, mixed $oldValue, mixed $newValue ) |
Notifies this UnitOfWork of a property change in an entity. |
|
recomputeSingleEntityChangeSet ( Doctrine\ORM\Mapping\ClassMetadata $class, object $entity ) |
INTERNAL:
Computes the changeset of an individual entity, independently of the
computeChangeSets() routine that is used at the beginning of a UnitOfWork#commit(). |
|
refresh ( object $entity ) |
Refreshes the state of the given entity from the database, overwriting
any local, unpersisted changes. |
|
registerManaged ( object $entity, array $id, array $data ) |
INTERNAL:
Registers an entity as managed. |
|
remove ( object $entity ) |
Deletes an entity as part of the current unit of work. |
|
removeFromIdentityMap ( object $entity ) : boolean |
INTERNAL:
Removes an entity from the identity map. This effectively detaches the
entity from the persistence management of Doctrine. |
|
scheduleCollectionDeletion ( Doctrine\ORM\PersistentCollection $coll ) |
INTERNAL:
Schedules a complete collection for removal when this UnitOfWork commits. |
|
scheduleExtraUpdate ( object $entity, array $changeset ) |
INTERNAL:
Schedules an extra update that will be executed immediately after the
regular entity updates within the currently running commit cycle. |
|
scheduleForDelete ( object $entity ) |
INTERNAL:
Schedules an entity for deletion. |
|
scheduleForDirtyCheck ( object $entity ) |
Schedules an entity for dirty-checking at commit-time. |
|
scheduleForInsert ( object $entity ) |
Schedules an entity for insertion into the database. |
|
scheduleForUpdate ( object $entity ) |
Schedules an entity for being updated. |
|
scheduleOrphanRemoval ( object $entity ) |
INTERNAL:
Schedules an orphaned entity for removal. The remove() operation will be
invoked on that entity at the beginning of the next commit of this
UnitOfWork. |
|
setOriginalEntityData ( $entity, array $data ) |
|
|
setOriginalEntityProperty ( string $oid, string $property, mixed $value ) |
INTERNAL:
Sets a property value of the original data array of an entity. |
|
size ( ) : integer |
Calculates the size of the UnitOfWork. The size of the UnitOfWork is the
number of entities in the identity map. |
|
tryGetById ( mixed $id, string $rootClassName ) : mixed |
Tries to find an entity with the given identifier in the identity map of
this UnitOfWork. |
|
tryGetByIdHash ( string $idHash, string $rootClassName ) : mixed |
INTERNAL:
Tries to get an entity by its identifier hash. If no entity is found for
the given hash, FALSE is returned. |
|