Neos\Flow\Persistence\Generic\Session::hasObject PHP Method

hasObject() public method

Checks whether the given object is known to the identity map
public hasObject ( object $object ) : boolean
$object object
return boolean
    public function hasObject($object)
    {
        return $this->objectMap->contains($object);
    }

Usage Example

 /**
  * Iterate over deleted entities and process them
  *
  * @return void
  */
 protected function processDeletedObjects()
 {
     foreach ($this->deletedEntities as $entity) {
         if ($this->persistenceSession->hasObject($entity)) {
             $this->removeEntity($entity);
             $this->persistenceSession->unregisterReconstitutedEntity($entity);
             $this->persistenceSession->unregisterObject($entity);
         }
     }
     $this->deletedEntities = new \SplObjectStorage();
 }
All Usage Examples Of Neos\Flow\Persistence\Generic\Session::hasObject