PHP Class Doctrine\ODM\PHPCR\ReferenceManyCollection

This class stores all documents or their proxies referenced by a reference many property
Inheritance: extends Doctrine\ODM\PHPCR\PersistentCollection
Datei anzeigen Open project: doctrine/phpcr-odm Class Usage Examples

Public Methods

Method Description
__construct ( Doctrine\ODM\PHPCR\DocumentManagerInterface $dm, object $document, string $property, array $referencedNodes, string $targetDocument, string $locale = null, string $referenceType = self::REFERENCE_TYPE_UUID ) Creates a new persistent collection.
count ( ) {@inheritDoc}
createFromCollection ( Doctrine\ODM\PHPCR\DocumentManagerInterface $dm, object $document, string $property, array | Doctrine\Common\Collections\Collection $collection, string $targetDocument, boolean $forceOverwrite = false ) : ReferenceManyCollection
getOriginalPaths ( ) : array Return the ordered list of references that existed when the collection was initialized
initialize ( ) Initializes the collection by loading its contents from the database if the collection is not yet initialized.
isEmpty ( ) {@inheritDoc}
refresh ( ) {@inheritDoc}
takeSnapshot ( ) Reset original reference paths and mark the collection as non dirty

Method Details

__construct() public method

Creates a new persistent collection.
public __construct ( Doctrine\ODM\PHPCR\DocumentManagerInterface $dm, object $document, string $property, array $referencedNodes, string $targetDocument, string $locale = null, string $referenceType = self::REFERENCE_TYPE_UUID )
$dm Doctrine\ODM\PHPCR\DocumentManagerInterface The DocumentManager the collection will be associated with.
$document object The document with the references property
$property string The node property name with the multivalued references
$referencedNodes array An array of referenced nodes (UUID or path)
$targetDocument string The class name of the target documents
$locale string The locale to use during the loading of this collection
$referenceType string Identifiers used for reference nodes in this collection, either path or default uuid

count() public method

{@inheritDoc}
public count ( )

createFromCollection() public static method

public static createFromCollection ( Doctrine\ODM\PHPCR\DocumentManagerInterface $dm, object $document, string $property, array | Doctrine\Common\Collections\Collection $collection, string $targetDocument, boolean $forceOverwrite = false ) : ReferenceManyCollection
$dm Doctrine\ODM\PHPCR\DocumentManagerInterface The DocumentManager the collection will be associated with.
$document object The document with the references property
$property string The node property name with the multivalued references
$collection array | Doctrine\Common\Collections\Collection The collection to initialize with
$targetDocument string The class name of the target documents
$forceOverwrite boolean If to force the database to be forced to the state of the collection
return ReferenceManyCollection

getOriginalPaths() public method

Return the ordered list of references that existed when the collection was initialized
public getOriginalPaths ( ) : array
return array

initialize() public method

Initializes the collection by loading its contents from the database if the collection is not yet initialized.
public initialize ( )

isEmpty() public method

{@inheritDoc}
public isEmpty ( )

refresh() public method

{@inheritDoc}
public refresh ( )

takeSnapshot() public method

Reset original reference paths and mark the collection as non dirty
public takeSnapshot ( )