original_string: public static function parse_areaid($areaid) {
          $parts = self::extract_areaid_parts($areaid);
  
          if (empty($parts[1])) {
              throw new \coding_exception('Trying to parse invalid search area id ' . $areaid);
          }
  
          $component = $parts[0];
          $area = $parts[1];
  
          if (strpos($component, 'core') === 0) {
              $plugin = 'core_search';
              $configprefix = str_replace('-', '_', $areaid);
          } else {
              $plugin = $component;
              $configprefix = 'search_' . $area;
          }
  
          return [$plugin, $configprefix];
      }
code: public static function parse_areaid($areaid) {
          $parts = self::extract_areaid_parts($areaid);
  
          if (empty($parts[1])) {
              throw new \coding_exception('Trying to parse invalid search area id ' . $areaid);
          }
  
          $component = $parts[0];
          $area = $parts[1];
  
          if (strpos($component, 'core') === 0) {
              $plugin = 'core_search';
              $configprefix = str_replace('-', '_', $areaid);
          } else {
              $plugin = $component;
              $configprefix = 'search_' . $area;
          }
  
          return [$plugin, $configprefix];
      }
code_tokens: public static function parse_areaid ( $ areaid ) { $ parts = self :: extract_areaid_parts ( $ areaid ) ; if ( empty ( $ parts [ 1 ] ) ) { throw new \ coding_exception ( 'Trying to parse invalid search area id ' . $ areaid ) ; } $ component = $ parts [ 0 ] ; $ area = $ parts [ 1 ] ; if ( strpos ( $ component , 'core' ) === 0 ) { $ plugin = 'core_search' ; $ configprefix = str_replace ( '-' , '_' , $ areaid ) ; } else { $ plugin = $ component ; $ configprefix = 'search_' . $ area ; } return [ $ plugin , $ configprefix ] ; }
docstring: Parse a search area id and get plugin name and config name prefix from it.
  
  @param string $areaid Search area id.
  @return array Where the first element is a plugin name and the second is config names prefix.
docstring_tokens: Parse a search area id and get plugin name and config name prefix from it .