original_string: public static function register($baseDir = null)
      {
          $key = $baseDir ? $baseDir : 0;
  
          if (!isset(self::$instances[$key])) {
              self::$instances[$key] = new self($baseDir);
          }
  
          $loader = self::$instances[$key];
          spl_autoload_register(array($loader, 'autoload'));
  
          return $loader;
      }
code: public static function register($baseDir = null)
      {
          $key = $baseDir ? $baseDir : 0;
  
          if (!isset(self::$instances[$key])) {
              self::$instances[$key] = new self($baseDir);
          }
  
          $loader = self::$instances[$key];
          spl_autoload_register(array($loader, 'autoload'));
  
          return $loader;
      }
code_tokens: public static function register ( $ baseDir = null ) { $ key = $ baseDir ? $ baseDir : 0 ; if ( ! isset ( self :: $ instances [ $ key ] ) ) { self :: $ instances [ $ key ] = new self ( $ baseDir ) ; } $ loader = self :: $ instances [ $ key ] ; spl_autoload_register ( array ( $ loader , 'autoload' ) ) ; return $ loader ; }
docstring: Register a new instance as an SPL autoloader.
  
  @param string $baseDir Mustache library base directory (default: dirname(__FILE__).'/..')
  
  @return Mustache_Autoloader Registered Autoloader instance
docstring_tokens: Register a new instance as an SPL autoloader .