lib/Doctrine/ORM/EntityManager.php
public function contains($entity)
    {
        return $this->unitOfWork->isScheduledForInsert($entity)
            || ($this->unitOfWork->isInIdentityMap($entity) && ! $this->unitOfWork->isScheduledForDelete($entity));
    }
public function contains($entity)
    {
        return $this->unitOfWork->isScheduledForInsert($entity)
            || ($this->unitOfWork->isInIdentityMap($entity) && ! $this->unitOfWork->isScheduledForDelete($entity));
    }
public function contains ( $ entity ) { return $ this -> unitOfWork -> isScheduledForInsert ( $ entity ) || ( $ this -> unitOfWork -> isInIdentityMap ( $ entity ) && ! $ this -> unitOfWork -> isScheduledForDelete ( $ entity ) ) ; }
Determines whether an entity instance is managed in this EntityManager.

@param object $entity

@return bool TRUE if this EntityManager currently manages the given entity, FALSE otherwise.
Determines whether an entity instance is managed in this EntityManager .