original_string: protected function restore_response($forcereload = false) {
  
          if (!$forcereload and !is_null($this->recentresponse)) {
              // We already have it, nothing to do.
              return;
          }
  
          $config = get_config('core_plugin');
  
          if (!empty($config->recentresponse) and !empty($config->recentfetch)) {
              try {
                  $this->validate_response($config->recentresponse);
                  $this->recentfetch = $config->recentfetch;
                  $this->recentresponse = $this->decode_response($config->recentresponse);
              } catch (checker_exception $e) {
                  // The server response is not valid. Behave as if no data were fetched yet.
                  // This may happen when the most recent update info (cached locally) has been
                  // fetched with the previous branch of Moodle (like during an upgrade from 2.x
                  // to 2.y) or when the API of the response has changed.
                  $this->recentresponse = array();
              }
  
          } else {
              $this->recentresponse = array();
          }
      }
code: protected function restore_response($forcereload = false) {
  
          if (!$forcereload and !is_null($this->recentresponse)) {
              // We already have it, nothing to do.
              return;
          }
  
          $config = get_config('core_plugin');
  
          if (!empty($config->recentresponse) and !empty($config->recentfetch)) {
              try {
                  $this->validate_response($config->recentresponse);
                  $this->recentfetch = $config->recentfetch;
                  $this->recentresponse = $this->decode_response($config->recentresponse);
              } catch (checker_exception $e) {
                  // The server response is not valid. Behave as if no data were fetched yet.
                  // This may happen when the most recent update info (cached locally) has been
                  // fetched with the previous branch of Moodle (like during an upgrade from 2.x
                  // to 2.y) or when the API of the response has changed.
                  $this->recentresponse = array();
              }
  
          } else {
              $this->recentresponse = array();
          }
      }
code_tokens: protected function restore_response ( $ forcereload = false ) { if ( ! $ forcereload and ! is_null ( $ this -> recentresponse ) ) { // We already have it, nothing to do. return ; } $ config = get_config ( 'core_plugin' ) ; if ( ! empty ( $ config -> recentresponse ) and ! empty ( $ config -> recentfetch ) ) { try { $ this -> validate_response ( $ config -> recentresponse ) ; $ this -> recentfetch = $ config -> recentfetch ; $ this -> recentresponse = $ this -> decode_response ( $ config -> recentresponse ) ; } catch ( checker_exception $ e ) { // The server response is not valid. Behave as if no data were fetched yet. // This may happen when the most recent update info (cached locally) has been // fetched with the previous branch of Moodle (like during an upgrade from 2.x // to 2.y) or when the API of the response has changed. $ this -> recentresponse = array ( ) ; } } else { $ this -> recentresponse = array ( ) ; } }
docstring: Loads the most recent raw response record we have fetched
  
  After this method is called, $this->recentresponse is set to an array. If the
  array is empty, then either no data have been fetched yet or the fetched data
  do not have expected format (and thence they are ignored and a debugging
  message is displayed).
  
  This implementation uses the config_plugins table as the permanent storage.
  
  @param bool $forcereload reload even if it was already loaded
docstring_tokens: Loads the most recent raw response record we have fetched