original_string: public function register()
      {
          spl_autoload_register(function ($class) {
              $prefix = $class;
              while (false !== $pos = strrpos($prefix, '\\')) {
                  $prefix = substr($class, 0, $pos + 1);
                  $relativeClass = substr($class, $pos + 1);
                  $paths = $this->getPaths($prefix);
                  if ($paths !== null) {
                      foreach ($paths as $baseDir) {
                          $file = $baseDir.str_replace('\\', DIRECTORY_SEPARATOR, $relativeClass).'.php';
                          if (file_exists($file)) {
                              require $file;
  
                              return true;
                          }
                      }
                  }
                  $prefix = rtrim($prefix, '\\');
              }
  
              return false;
          });
      }
code: public function register()
      {
          spl_autoload_register(function ($class) {
              $prefix = $class;
              while (false !== $pos = strrpos($prefix, '\\')) {
                  $prefix = substr($class, 0, $pos + 1);
                  $relativeClass = substr($class, $pos + 1);
                  $paths = $this->getPaths($prefix);
                  if ($paths !== null) {
                      foreach ($paths as $baseDir) {
                          $file = $baseDir.str_replace('\\', DIRECTORY_SEPARATOR, $relativeClass).'.php';
                          if (file_exists($file)) {
                              require $file;
  
                              return true;
                          }
                      }
                  }
                  $prefix = rtrim($prefix, '\\');
              }
  
              return false;
          });
      }
code_tokens: public function register ( ) { spl_autoload_register ( function ( $ class ) { $ prefix = $ class ; while ( false !== $ pos = strrpos ( $ prefix , '\\' ) ) { $ prefix = substr ( $ class , 0 , $ pos + 1 ) ; $ relativeClass = substr ( $ class , $ pos + 1 ) ; $ paths = $ this -> getPaths ( $ prefix ) ; if ( $ paths !== null ) { foreach ( $ paths as $ baseDir ) { $ file = $ baseDir . str_replace ( '\\' , DIRECTORY_SEPARATOR , $ relativeClass ) . '.php' ; if ( file_exists ( $ file ) ) { require $ file ; return true ; } } } $ prefix = rtrim ( $ prefix , '\\' ) ; } return false ; } ) ; }
docstring: Registers the autoloading via SPL.
docstring_tokens: Registers the autoloading via SPL .