private function checkFieldsClarity()
    {
        //Initialize with dirty flag.
        $dirty = $this->dirty;
        foreach ($this->getFields() as $field) {
            $dirty = $dirty || $field->isDirty();
        }

        //If flag was set to dirty, or any of fields was dirty, reset cache.
        if ($dirty) {
            $this->cache = [];
            $this->dirty = false;
        }
    }
private function checkFieldsClarity()
    {
        //Initialize with dirty flag.
        $dirty = $this->dirty;
        foreach ($this->getFields() as $field) {
            $dirty = $dirty || $field->isDirty();
        }

        //If flag was set to dirty, or any of fields was dirty, reset cache.
        if ($dirty) {
            $this->cache = [];
            $this->dirty = false;
        }
    }
private function checkFieldsClarity ( ) { //Initialize with dirty flag. $ dirty = $ this -> dirty ; foreach ( $ this -> getFields ( ) as $ field ) { $ dirty = $ dirty || $ field -> isDirty ( ) ; } //If flag was set to dirty, or any of fields was dirty, reset cache. if ( $ dirty ) { $ this -> cache = [ ] ; $ this -> dirty = false ; } }
Checks if from last time some of data has changed, and if did, resets cache.
Checks if from last time some of data has changed and if did resets cache .