original_string: protected static function get_class_file($class, $prefix, $path, $separators) {
          global $CFG;
  
          // Does the class use the namespace prefix?
          $len = strlen($prefix);
          if (strncmp($prefix, $class, $len) !== 0) {
              // No, move to the next prefix.
              return false;
          }
          $path = $CFG->dirroot . '/' . $path;
  
          // Get the relative class name.
          $relativeclass = substr($class, $len);
  
          // Replace the namespace prefix with the base directory, replace namespace
          // separators with directory separators in the relative class name, append
          // with .php.
          $file = $path . str_replace($separators, '/', $relativeclass) . '.php';
  
          return $file;
      }
code: protected static function get_class_file($class, $prefix, $path, $separators) {
          global $CFG;
  
          // Does the class use the namespace prefix?
          $len = strlen($prefix);
          if (strncmp($prefix, $class, $len) !== 0) {
              // No, move to the next prefix.
              return false;
          }
          $path = $CFG->dirroot . '/' . $path;
  
          // Get the relative class name.
          $relativeclass = substr($class, $len);
  
          // Replace the namespace prefix with the base directory, replace namespace
          // separators with directory separators in the relative class name, append
          // with .php.
          $file = $path . str_replace($separators, '/', $relativeclass) . '.php';
  
          return $file;
      }
code_tokens: protected static function get_class_file ( $ class , $ prefix , $ path , $ separators ) { global $ CFG ; // Does the class use the namespace prefix? $ len = strlen ( $ prefix ) ; if ( strncmp ( $ prefix , $ class , $ len ) !== 0 ) { // No, move to the next prefix. return false ; } $ path = $ CFG -> dirroot . '/' . $ path ; // Get the relative class name. $ relativeclass = substr ( $ class , $ len ) ; // Replace the namespace prefix with the base directory, replace namespace // separators with directory separators in the relative class name, append // with .php. $ file = $ path . str_replace ( $ separators , '/' , $ relativeclass ) . '.php' ; return $ file ; }
docstring: Return the path to the class based on the given namespace prefix and path it corresponds to.
  
  Will return the path even if the file does not exist. Check the file esists before requiring.
  
  @param string $class the name of the class.
  @param string $prefix The namespace prefix used to identify the base directory of the source files.
  @param string $path The relative path to the base directory of the source files.
  @param string[] $separators The characters that should be used for separating.
  @return string|bool The full path to the file defining the class. Or false if it could not be resolved.
docstring_tokens: Return the path to the class based on the given namespace prefix and path it corresponds to .