contains() public méthode

public contains ( object | string $document ) : boolean
$document object | string document instance or document object hash
Résultat boolean
 /**
  * {@inheritDoc}
  *
  * Check if this repository contains the object
  *
  * @param object $document
  *
  * @return boolean true if the repository contains the object, false otherwise
  *
  * @throws InvalidArgumentException if $document is not an object.
  */
 public function contains($document)
 {
     if (!is_object($document)) {
         throw new InvalidArgumentException('Parameter $document needs to be an object, ' . gettype($document) . ' given');
     }
     return $this->unitOfWork->contains($document);
 }
 /**
  * @param  object $document
  * @return bool
  */
 public function contains($document)
 {
     if (!is_object($document)) {
         throw new \InvalidArgumentException(gettype($document));
     }
     return $this->unitOfWork->contains($document);
 }
Exemple #3
0
 /**
  * @param  object $document
  * @return bool
  */
 public function contains($document)
 {
     return $this->unitOfWork->contains($document);
 }