Пример #1
0
 /**
  * Get the documents that refer a given document using an optional name.
  *
  * This methods gets all nodes as a collection of documents that refer the
  * given document and matches a given name.
  * @param $document document instance which referrers should be loaded
  * @param string|array $name optional name to match on referrers names
  * @return a collection of referrer documents
  */
 public function getReferrers($document, $type = null, $name = null)
 {
     if (!is_object($document)) {
         throw new \InvalidArgumentException(gettype($document));
     }
     $this->errorIfClosed();
     return $this->unitOfWork->getReferrers($document, $type, $name);
 }
Пример #2
0
 /**
  * Get the documents that refer a given document using an optional name.
  *
  * This methods gets all nodes as a collection of documents that refer the
  * given document and matches a given name.
  * @param $document document instance which referrers should be loaded
  * @param string|array $name optional name to match on referrers names
  * @return a collection of referrer documents
  */
 public function getReferrers($document, $type = null, $name = null)
 {
     $this->errorIfClosed();
     return $this->unitOfWork->getReferrers($document, $type, $name);
 }