Doctrine\ODM\PHPCR\ReferenceManyCollection::__construct PHP Метод

__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
    public function __construct(DocumentManagerInterface $dm, $document, $property, array $referencedNodes, $targetDocument, $locale = null, $referenceType = self::REFERENCE_TYPE_UUID)
    {
        $this->dm = $dm;
        $this->document = $document;
        $this->property = $property;
        $this->referencedNodes = $referencedNodes;
        $this->targetDocument = $targetDocument;
        $this->locale = $locale;
        $this->referenceType = $referenceType;
    }