Doctrine\ODM\PHPCR\ReferenceManyCollection::getOriginalPaths PHP Method

getOriginalPaths() public method

Return the ordered list of references that existed when the collection was initialized
public getOriginalPaths ( ) : array
return array
    public function getOriginalPaths()
    {
        if (null === $this->originalReferencePaths) {
            $this->originalReferencePaths = array();
            if (self::INITIALIZED_FROM_COLLECTION === $this->initialized) {
                $uow = $this->dm->getUnitOfWork();
                foreach ($this->collection as $reference) {
                    $this->originalReferencePaths[] = $uow->getDocumentId($reference);
                }
            } else {
                if (self::REFERENCE_TYPE_UUID === $this->referenceType) {
                    $nodes = $this->dm->getPhpcrSession()->getNodesByIdentifier($this->referencedNodes);
                    foreach ($nodes as $node) {
                        $this->originalReferencePaths[] = $node->getPath();
                    }
                } else {
                    $this->originalReferencePaths = $this->referencedNodes;
                }
            }
        }
        return $this->originalReferencePaths;
    }