Method | Description | |
---|---|---|
__construct ( Doctrine\ODM\PHPCR\DocumentManagerInterface $dm ) | ||
bindTranslation ( object $document, string $locale ) | Bind the translatable fields of the document in the specified locale. | |
checkin ( $document ) | Checkin operation - Save all current changes and then check in the Node by id. | |
checkout ( $document ) | Check out operation - Save all current changes and then check out the Node by path. | |
checkpoint ( $document ) | Create a version of the document and check it out right again to continue editing. | |
clear ( ) | Clears the UnitOfWork. | |
commit ( object | array | null $document = null ) | Commits the UnitOfWork | |
computeChangeSet ( |
Computes changeset for a given document. | |
computeChangeSets ( ) | Detects the changes that need to be persisted | |
computeSingleDocumentChangeSet ( object $document ) | Detects the changes for a single document | |
contains ( object | string $document ) : boolean | ||
createAssoc ( array $properties, array $mapping ) : array | Create an associative array form the properties stored with the node | |
detach ( object $document ) | Detaches a document from the persistence management. It's persistence will no longer be managed by Doctrine. | |
determineDocumentId ( object $document, |
Try to determine the document id first by looking into the document, but if not mapped, look into the document id cache. | |
doLoadTranslation ( object $document, |
Load the translatable fields of the document. | |
findVersionByName ( $className, $id, $versionName ) | ||
getAllLinearVersions ( object $document, integer $limit ) : array | Get the version history information for a document | |
getCurrentLocale ( object $document, |
Determine the current locale of a managed document. | |
getDocumentById ( string $id ) : object | false | Tries to find a document with the given id in the identity map of this UnitOfWork. | |
getDocumentId ( object | string $document, $throw = true ) : string | null | Get the object ID for the given document | |
getDocumentState ( object $document ) : integer | Get the state of this document | |
getLocalesFor ( object $document ) : array | Get all locales in which this document currently exists in storage. | |
getOrCreateDocument ( null | string $className, PHPCR\NodeInterface $node, array &$hints = [] ) : object | Get the existing document or proxy of the specified class and node data or create a new one if not existing. | |
getOrCreateDocuments ( null | string $className, Iterato\Iterator | array $nodes, array &$hints = [] ) : array | Get the existing document or proxy of the specified class and node data or create a new one if not existing. | |
getOrCreateProxy ( string $targetId, string $className, string $locale = null ) : object | Get the existing document or proxy for this id of this class, or create a new one. | |
getOrCreateProxyFromNode ( PHPCR\NodeInterface $node, string $locale = null ) : object | Get the existing document or proxy or create a new one for this PHPCR Node | |
getPrefetchHelper ( ) | ||
getScheduledInserts ( ) : array | Gets the currently scheduled document insertions in this UnitOfWork. | |
getScheduledMoves ( ) : array | Gets the currently scheduled document moves in this UnitOfWork. | |
getScheduledRemovals ( ) : array | Gets the currently scheduled document deletions in this UnitOfWork. | |
getScheduledReorders ( ) : array | Gets the currently scheduled document reorders in this UnitOfWork. | |
getScheduledUpdates ( ) : array | Gets the currently scheduled document updates in this UnitOfWork. | |
initializeObject ( $obj ) | Helper method to initialize a lazy loading proxy or persistent collection. | |
invokeGlobalEvent ( $eventName, Doctrine\Common\EventArgs $event ) | To invoke a global invent without using the ListenersInvoker. | |
isDocumentTranslatable ( |
Determine whether this document is translatable. | |
isScheduledForInsert ( object $document ) : boolean | Checks whether a document is scheduled for insertion. | |
merge ( $document ) | ||
persistNew ( |
Persist new document, marking it managed and generating the id and the node. | |
processAssoc ( PHPCR\NodeInterface $node, array $mapping, array $assoc ) : array | Process null values in an associative array so that they can be stored in phpcr. | |
refresh ( $document ) | ||
refreshDocumentForProxy ( string $className, Doctrine\Common\Proxy\Proxy $document ) | Populate the proxy with actual data | |
registerDocument ( object $document, string $id ) : string | ||
removeAssoc ( PHPCR\NodeInterface $node, array $mapping ) | Remove an associative array form the properties stored with the node | |
removeTranslation ( object $document, string $locale ) | ||
removeVersion ( string $documentVersion ) | Delete an old version of a document | |
restoreVersion ( string $documentVersion, boolean $removeExisting ) | Restore the document to the state it was before | |
scheduleInsert ( object $document ) | Schedule insertion of this document and cascade if necessary. | |
scheduleMove ( $document, $targetPath ) | ||
scheduleRemove ( $document ) | ||
scheduleReorder ( $document, $srcName, $targetName, $before ) | ||
setFetchDepth ( integer | null $fetchDepth = null ) : integer | Sets the fetch depth on the session if the PHPCR session instance supports it and returns the previous fetch depth value | |
setPrefetchHelper ( $helper ) | ||
validateClassName ( object $document, string | null $className ) | Validate if a document is of the specified class, if the global setting to validate is activated. |
Method | Description | |
---|---|---|
doLoadDatabaseTranslation ( object $document, |
Attempt to load translation from the database. | |
doLoadPendingTranslation ( object $document, |
Load an in-memory bound translation if there is one in the requested locale. Does not attempt any fallback. |
Method | Description | |
---|---|---|
cascadeDetach ( |
Cascades a detach operation to associated documents. | |
cascadeDoLoadTranslation ( object $document, array $mapping, string $locale ) | ||
cascadeMerge ( |
Cascades a merge operation to associated entities. | |
cascadeMergeCollection ( $managedCol, array $mapping ) | ||
cascadeRefresh ( |
||
cascadeRemove ( |
||
cascadeScheduleInsert ( |
||
cascadeScheduleParentInsert ( $class, $document, &$visited ) | ||
computeAssociationChanges ( object $document, string $class, string $oid, boolean $isNew, array $changeSet, string $assocType ) | ||
computeChildChanges ( array $mapping, mixed $child, string $parentId, string $nodename, mixed $parent = null ) : object | Computes the changes of a child. | |
computeChildrenChanges ( object $document, string $class, string $oid, boolean $isNew, array $changeSet ) | ||
computeReferenceChanges ( array $mapping, mixed $reference ) | Computes the changes of a reference. | |
computeReferrerChanges ( array $mapping, mixed $referrer ) | Computes the changes of a referrer. | |
doBindTranslation ( object $document, string $locale, |
||
doDetach ( object $document, array &$visited ) | Executes a detach operation on the given document. | |
doMerge ( $document, array &$visited, $prevManagedCopy = null, $assoc = null ) | ||
doMergeSingleDocumentProperty ( $managedCopy, $document, ReflectionProperty $prop, array $mapping ) | ||
doRefresh ( $document, &$visited ) | ||
doRemove ( $document, &$visited ) | ||
doRemoveAllTranslations ( object $document, |
||
doSaveTranslation ( $document, PHPCR\NodeInterface $node, $metadata ) | ||
doScheduleInsert ( $document, &$visited, $overrideIdGenerator = null ) | ||
executeInserts ( array $documents ) | Executes all document insertions | |
executeMoves ( array $documents ) | Executes all document moves | |
executeRemovals ( array $documents ) | Executes all document removals | |
executeReorders ( $documents ) | Execute reorderings | |
executeUpdates ( array $documents, boolean $dispatchEvents = true ) | Executes all document updates | |
generateUuid ( ) : string | ||
getChildNodename ( string $parentId, string $nodename, object $child, object $parent ) : mixed | string | Determine the nodename of a child in a children list. | |
getDocumentActualData ( |
Get a documents actual data, flattening all the objects to arrays. | |
getIdGenerator ( string $type ) : Doctrine\ODM\PHPCR\Id\IdGenerator | ||
getReferenceManyCollectionTypeFromMetadata ( $referenceFieldMetadata ) : string | Extracts ReferenceManyCollection type from field metadata | |
getVersionedNodePath ( $document ) | ||
isAutocreatedProperty ( |
Identify whether a PHPCR property is autocreated or not. | |
isTranslationRemoved ( object $document, string $locale ) : boolean | Checks if the translation was removed Note it also returns true if the document isn't translated or was not translated into the given locale, ie. | |
objToStr ( $obj, Doctrine\ODM\PHPCR\DocumentManagerInterface $dm = null ) | ||
purgeChildren ( object $document ) | recurse over all known child documents to remove them form this unit of work as their parent gets removed from phpcr. If you do not, flush will try to create orphaned nodes if these documents are modified which leads to a PHPCR exception | |
setDocumentState ( object | string $document, integer $state ) | ||
setLocale ( object $document, |
||
setMixins ( |
Set the mapped mixins. | |
unregisterDocument ( object $document ) | Removes a document from the identity map. This effectively detaches the document from the persistence management of Doctrine. | |
validateChildClass ( PHPCR\NodeInterface $parentNode, |
If the parent node has child restrictions, ensure that the given class name is within them. |
public __construct ( Doctrine\ODM\PHPCR\DocumentManagerInterface $dm ) | ||
$dm | Doctrine\ODM\PHPCR\DocumentManagerInterface |
public bindTranslation ( object $document, string $locale ) | ||
$document | object | the document to persist a translation of |
$locale | string | the locale this document currently has |
public checkin ( $document ) |
public checkout ( $document ) |
public checkpoint ( $document ) |
public computeChangeSet ( |
||
$class | ||
$document | object |
public computeChangeSets ( ) |
public computeSingleDocumentChangeSet ( object $document ) | ||
$document | object |
protected doLoadDatabaseTranslation ( object $document, |
||
$document | object | |
$metadata | ||
$locale | string | The desired locale. |
$fallback | boolean | Whether to perform language fallback. |
$refresh | boolean | Whether to force reloading the translation. |
return | string | The locale used |
public doLoadTranslation ( object $document, |
||
$document | object | |
$metadata | ||
$locale | string | The locale to use or null if the default locale should be used |
$fallback | boolean | Whether to do try other languages |
$refresh | boolean |
public getAllLinearVersions ( object $document, integer $limit ) : array | ||
$document | object | the document of which to get the version history |
$limit | integer | an optional limit to only get the latest $limit information |
return | array | of |
public getCurrentLocale ( object $document, |
||
$document | object | the managed document to get the locale for |
$metadata | document metadata, optional | |
return | string | null | the current locale of $document or null if it is not translatable |
public getDocumentById ( string $id ) : object | false | ||
$id | string | The document id to look for. |
return | object | false | Returns the document with the specified id if it exists in this UnitOfWork, FALSE otherwise. |
public getDocumentState ( object $document ) : integer | ||
$document | object | the document to get the state of |
return | integer | one of the STATE_* constants of this class |
public getLocalesFor ( object $document ) : array | ||
$document | object | A managed document |
return | array | list of locales of this document |
public getOrCreateProxyFromNode ( PHPCR\NodeInterface $node, string $locale = null ) : object | ||
$node | PHPCR\NodeInterface | |
$locale | string | |
return | object |
public getScheduledInserts ( ) : array | ||
return | array |
public getScheduledMoves ( ) : array | ||
return | array |
public getScheduledRemovals ( ) : array | ||
return | array |
public getScheduledReorders ( ) : array | ||
return | array |
public getScheduledUpdates ( ) : array | ||
return | array |
public initializeObject ( $obj ) |
public invokeGlobalEvent ( $eventName, Doctrine\Common\EventArgs $event ) | ||
$eventName | ||
$event | Doctrine\Common\EventArgs |
public isDocumentTranslatable ( |
||
$metadata | the document meta data | |
return | boolean |
public isScheduledForInsert ( object $document ) : boolean | ||
$document | object | |
return | boolean |
public persistNew ( |
||
$class | ||
$document | object |
public refreshDocumentForProxy ( string $className, Doctrine\Common\Proxy\Proxy $document ) | ||
$className | string | |
$document | Doctrine\Common\Proxy\Proxy |
public removeAssoc ( PHPCR\NodeInterface $node, array $mapping ) | ||
$node | PHPCR\NodeInterface | the node where to store the assoc array |
$mapping | array | the field's mapping |
public removeTranslation ( object $document, string $locale ) | ||
$document | object | |
$locale | string |
public removeVersion ( string $documentVersion ) | ||
$documentVersion | string | the version name |
public restoreVersion ( string $documentVersion, boolean $removeExisting ) | ||
$documentVersion | string | the version name to restore |
$removeExisting | boolean | how to handle identifier collisions |
public scheduleInsert ( object $document ) | ||
$document | object |
public scheduleReorder ( $document, $srcName, $targetName, $before ) |