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;
    }
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;
    }
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 ; }
Register a new instance as an SPL autoloader.

@param string $baseDir Mustache library base directory (default: dirname(__FILE__).'/..')

@return Mustache_Autoloader Registered Autoloader instance
Register a new instance as an SPL autoloader .