original_string: protected function load_deprecated_strings() {
          global $CFG;
  
          if ($this->cacheddeprecated !== null) {
              return $this->cacheddeprecated;
          }
  
          $this->cacheddeprecated = array();
          $content = '';
          $filename = $CFG->dirroot . '/lang/en/deprecated.txt';
          if (file_exists($filename)) {
              $content .= file_get_contents($filename);
          }
          foreach (core_component::get_plugin_types() as $plugintype => $plugintypedir) {
              foreach (core_component::get_plugin_list($plugintype) as $pluginname => $plugindir) {
                  $filename = $plugindir.'/lang/en/deprecated.txt';
                  if (file_exists($filename)) {
                      $content .= "\n". file_get_contents($filename);
                  }
              }
          }
  
          $strings = preg_split('/\s*\n\s*/', $content, -1, PREG_SPLIT_NO_EMPTY);
          $this->cacheddeprecated = array_flip($strings);
  
          return $this->cacheddeprecated;
      }
code: protected function load_deprecated_strings() {
          global $CFG;
  
          if ($this->cacheddeprecated !== null) {
              return $this->cacheddeprecated;
          }
  
          $this->cacheddeprecated = array();
          $content = '';
          $filename = $CFG->dirroot . '/lang/en/deprecated.txt';
          if (file_exists($filename)) {
              $content .= file_get_contents($filename);
          }
          foreach (core_component::get_plugin_types() as $plugintype => $plugintypedir) {
              foreach (core_component::get_plugin_list($plugintype) as $pluginname => $plugindir) {
                  $filename = $plugindir.'/lang/en/deprecated.txt';
                  if (file_exists($filename)) {
                      $content .= "\n". file_get_contents($filename);
                  }
              }
          }
  
          $strings = preg_split('/\s*\n\s*/', $content, -1, PREG_SPLIT_NO_EMPTY);
          $this->cacheddeprecated = array_flip($strings);
  
          return $this->cacheddeprecated;
      }
code_tokens: protected function load_deprecated_strings ( ) { global $ CFG ; if ( $ this -> cacheddeprecated !== null ) { return $ this -> cacheddeprecated ; } $ this -> cacheddeprecated = array ( ) ; $ content = '' ; $ filename = $ CFG -> dirroot . '/lang/en/deprecated.txt' ; if ( file_exists ( $ filename ) ) { $ content .= file_get_contents ( $ filename ) ; } foreach ( core_component :: get_plugin_types ( ) as $ plugintype => $ plugintypedir ) { foreach ( core_component :: get_plugin_list ( $ plugintype ) as $ pluginname => $ plugindir ) { $ filename = $ plugindir . '/lang/en/deprecated.txt' ; if ( file_exists ( $ filename ) ) { $ content .= "\n" . file_get_contents ( $ filename ) ; } } } $ strings = preg_split ( '/\s*\n\s*/' , $ content , - 1 , PREG_SPLIT_NO_EMPTY ) ; $ this -> cacheddeprecated = array_flip ( $ strings ) ; return $ this -> cacheddeprecated ; }
docstring: Parses all deprecated.txt in all plugins lang locations and returns the list of deprecated strings.
  
  Static variable is used for caching, this function is only called in dev environment.
  
  @return array of deprecated strings in the same format they appear in deprecated.txt files: "identifier,component"
  where component is a normalised component (i.e. "core_moodle", "mod_assign", etc.)
docstring_tokens: Parses all deprecated . txt in all plugins lang locations and returns the list of deprecated strings .