public function isDirty()
    {
        if (count($this) != $this->_original) {
            return true;
        }
        if (count($this->_deleted)) {
            return true;
        }
        foreach ($this as $model) {
            if (is_object($model)
                && ($model->isDirty() || $model->isNew())
            ) {
                return true;
            }
        }
        return false;
    }
public function isDirty()
    {
        if (count($this) != $this->_original) {
            return true;
        }
        if (count($this->_deleted)) {
            return true;
        }
        foreach ($this as $model) {
            if (is_object($model)
                && ($model->isDirty() || $model->isNew())
            ) {
                return true;
            }
        }
        return false;
    }
public function isDirty ( ) { if ( count ( $ this ) != $ this -> _original ) { return true ; } if ( count ( $ this -> _deleted ) ) { return true ; } foreach ( $ this as $ model ) { if ( is_object ( $ model ) && ( $ model -> isDirty ( ) || $ model -> isNew ( ) ) ) { return true ; } } return false ; }
Check if the collection is "dirty", i.e. its contents have changed since
the last save.

@return boolean true if dirty, otherwise false.
Check if the collection is dirty i . e . its contents have changed since the last save .