public function isDirty($property = null)
    {
        if ($property === null) {
            return !empty($this->_dirty);
        }

        return isset($this->_dirty[$property]);
    }
public function isDirty($property = null)
    {
        if ($property === null) {
            return !empty($this->_dirty);
        }

        return isset($this->_dirty[$property]);
    }
public function isDirty ( $ property = null ) { if ( $ property === null ) { return ! empty ( $ this -> _dirty ) ; } return isset ( $ this -> _dirty [ $ property ] ) ; }
Checks if the entity is dirty or if a single property of it is dirty.

@param string|null $property The field to check the status for. Null for the whole entity.
@return bool Whether the property was changed or not
Checks if the entity is dirty or if a single property of it is dirty .