public function hasChanged($entity)
    {
        $hashId = $this->getHashId($entity);

        if (!isset($this->originalData[$hashId])) {
            throw new OrmException("Entity is not registered");
        }

        if (isset($this->comparators[get_class($entity)])) {
            return $this->hasChangedUsingComparisonFunction($entity);
        }

        return $this->hasChangedUsingReflection($entity);
    }
public function hasChanged($entity)
    {
        $hashId = $this->getHashId($entity);

        if (!isset($this->originalData[$hashId])) {
            throw new OrmException("Entity is not registered");
        }

        if (isset($this->comparators[get_class($entity)])) {
            return $this->hasChangedUsingComparisonFunction($entity);
        }

        return $this->hasChangedUsingReflection($entity);
    }
public function hasChanged ( $ entity ) { $ hashId = $ this -> getHashId ( $ entity ) ; if ( ! isset ( $ this -> originalData [ $ hashId ] ) ) { throw new OrmException ( "Entity is not registered" ) ; } if ( isset ( $ this -> comparators [ get_class ( $ entity ) ] ) ) { return $ this -> hasChangedUsingComparisonFunction ( $ entity ) ; } return $ this -> hasChangedUsingReflection ( $ entity ) ; }
Gets whether or not an entity has changed since it was registered

@param   object $entity The entity to check

@return  boolean  True if the entity has changed, otherwise false
@throws  OrmException  if the entity was not registered in the first place
Gets whether or not an entity has changed since it was registered