protected function purgeScope($scope)
    {
        foreach ($scope as $name => $obj) {
            if ($obj instanceof Generic) {
                if ($obj->source === 'config' && ($obj->revision < $this->revision)) {
                    if (!$obj->resetToDefault()) {
                        unset($scope->{$name});
                    }
                }
            } elseif ($obj instanceof Section) {
                if ($obj->source === 'config' && ($obj->revision < $this->revision)) {
                    if ($obj->count() === 0) {
                        unset($scope->{$name});
                    } elseif (isset($obj->enable)) {
                        $obj->enable->setValue(false);
                    }
                }
            }
        }
    }
protected function purgeScope($scope)
    {
        foreach ($scope as $name => $obj) {
            if ($obj instanceof Generic) {
                if ($obj->source === 'config' && ($obj->revision < $this->revision)) {
                    if (!$obj->resetToDefault()) {
                        unset($scope->{$name});
                    }
                }
            } elseif ($obj instanceof Section) {
                if ($obj->source === 'config' && ($obj->revision < $this->revision)) {
                    if ($obj->count() === 0) {
                        unset($scope->{$name});
                    } elseif (isset($obj->enable)) {
                        $obj->enable->setValue(false);
                    }
                }
            }
        }
    }
protected function purgeScope ( $ scope ) { foreach ( $ scope as $ name => $ obj ) { if ( $ obj instanceof Generic ) { if ( $ obj -> source === 'config' && ( $ obj -> revision < $ this -> revision ) ) { if ( ! $ obj -> resetToDefault ( ) ) { unset ( $ scope -> { $ name } ) ; } } } elseif ( $ obj instanceof Section ) { if ( $ obj -> source === 'config' && ( $ obj -> revision < $ this -> revision ) ) { if ( $ obj -> count ( ) === 0 ) { unset ( $ scope -> { $ name } ) ; } elseif ( isset ( $ obj -> enable ) ) { $ obj -> enable -> setValue ( false ) ; } } } } }
Removes old config parts after updating.
@return void
Removes old config parts after updating .