PHP Класс Doctrine\ODM\PHPCR\ReferenceManyCollection

This class stores all documents or their proxies referenced by a reference many property
Наследование: extends Doctrine\ODM\PHPCR\PersistentCollection
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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

Описание методов

__construct() публичный Метод

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() публичный Метод

{@inheritDoc}
public count ( )

createFromCollection() публичный статический Метод

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
Результат ReferenceManyCollection

getOriginalPaths() публичный Метод

Return the ordered list of references that existed when the collection was initialized
public getOriginalPaths ( ) : array
Результат array

initialize() публичный Метод

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

isEmpty() публичный Метод

{@inheritDoc}
public isEmpty ( )

refresh() публичный Метод

{@inheritDoc}
public refresh ( )

takeSnapshot() публичный Метод

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