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
Afficher le fichier Open project: doctrine/phpcr-odm Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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 méthode

{@inheritDoc}
public count ( )

createFromCollection() public static méthode

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
Résultat ReferenceManyCollection

getOriginalPaths() public méthode

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

initialize() public méthode

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

isEmpty() public méthode

{@inheritDoc}
public isEmpty ( )

refresh() public méthode

{@inheritDoc}
public refresh ( )

takeSnapshot() public méthode

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