protected function checkEntityType($entity)
    {
        if (get_class($entity) != $this->entityMap->getClass() && !is_subclass_of($entity, $this->entityMap->getClass())) {
            $expected = $this->entityMap->getClass();
            $actual = get_class($entity);

            throw new InvalidArgumentException("Expected : $expected, got $actual.");
        }
    }
protected function checkEntityType($entity)
    {
        if (get_class($entity) != $this->entityMap->getClass() && !is_subclass_of($entity, $this->entityMap->getClass())) {
            $expected = $this->entityMap->getClass();
            $actual = get_class($entity);

            throw new InvalidArgumentException("Expected : $expected, got $actual.");
        }
    }
protected function checkEntityType ( $ entity ) { if ( get_class ( $ entity ) != $ this -> entityMap -> getClass ( ) && ! is_subclass_of ( $ entity , $ this -> entityMap -> getClass ( ) ) ) { $ expected = $ this -> entityMap -> getClass ( ) ; $ actual = get_class ( $ entity ) ; throw new InvalidArgumentException ( "Expected : $expected, got $actual." ) ; } }
Check that the entity correspond to the current mapper.

@param mixed $entity

@throws InvalidArgumentException

@return void
Check that the entity correspond to the current mapper .