original_string: protected function autoloadTheme($class)
      {
          $prefix = 'Grav\\Theme\\';
          if (false !== strpos($class, $prefix)) {
              // Remove prefix from class
              $class = substr($class, strlen($prefix));
              $locator = $this->grav['locator'];
  
              // First try lowercase version of the classname.
              $path = strtolower($class);
              $file = $locator("themes://{$path}/theme.php") ?: $locator("themes://{$path}/{$path}.php");
  
              if ($file) {
                  return include_once $file;
              }
  
              // Replace namespace tokens to directory separators
              $path = $this->grav['inflector']->hyphenize($class);
              $file = $locator("themes://{$path}/theme.php") ?: $locator("themes://{$path}/{$path}.php");
  
              // Load class
              if ($file) {
                  return include_once $file;
              }
  
              // Try Old style theme classes
              $path = strtolower(preg_replace('#\\\|_(?!.+\\\)#', '/', $class));
              $file = $locator("themes://{$path}/theme.php") ?: $locator("themes://{$path}/{$path}.php");
  
              // Load class
              if ($file) {
                  return include_once $file;
              }
          }
  
          return false;
      }
code: protected function autoloadTheme($class)
      {
          $prefix = 'Grav\\Theme\\';
          if (false !== strpos($class, $prefix)) {
              // Remove prefix from class
              $class = substr($class, strlen($prefix));
              $locator = $this->grav['locator'];
  
              // First try lowercase version of the classname.
              $path = strtolower($class);
              $file = $locator("themes://{$path}/theme.php") ?: $locator("themes://{$path}/{$path}.php");
  
              if ($file) {
                  return include_once $file;
              }
  
              // Replace namespace tokens to directory separators
              $path = $this->grav['inflector']->hyphenize($class);
              $file = $locator("themes://{$path}/theme.php") ?: $locator("themes://{$path}/{$path}.php");
  
              // Load class
              if ($file) {
                  return include_once $file;
              }
  
              // Try Old style theme classes
              $path = strtolower(preg_replace('#\\\|_(?!.+\\\)#', '/', $class));
              $file = $locator("themes://{$path}/theme.php") ?: $locator("themes://{$path}/{$path}.php");
  
              // Load class
              if ($file) {
                  return include_once $file;
              }
          }
  
          return false;
      }
code_tokens: protected function autoloadTheme ( $ class ) { $ prefix = 'Grav\\Theme\\' ; if ( false !== strpos ( $ class , $ prefix ) ) { // Remove prefix from class $ class = substr ( $ class , strlen ( $ prefix ) ) ; $ locator = $ this -> grav [ 'locator' ] ; // First try lowercase version of the classname. $ path = strtolower ( $ class ) ; $ file = $ locator ( "themes://{$path}/theme.php" ) ? : $ locator ( "themes://{$path}/{$path}.php" ) ; if ( $ file ) { return include_once $ file ; } // Replace namespace tokens to directory separators $ path = $ this -> grav [ 'inflector' ] -> hyphenize ( $ class ) ; $ file = $ locator ( "themes://{$path}/theme.php" ) ? : $ locator ( "themes://{$path}/{$path}.php" ) ; // Load class if ( $ file ) { return include_once $ file ; } // Try Old style theme classes $ path = strtolower ( preg_replace ( '#\\\|_(?!.+\\\)#' , '/' , $ class ) ) ; $ file = $ locator ( "themes://{$path}/theme.php" ) ? : $ locator ( "themes://{$path}/{$path}.php" ) ; // Load class if ( $ file ) { return include_once $ file ; } } return false ; }
docstring: Autoload theme classes for inheritance
  
  @param  string $class Class name
  
  @return mixed  false  FALSE if unable to load $class; Class name if
  $class is successfully loaded
docstring_tokens: Autoload theme classes for inheritance