Пример #1
0
 /**
  * Registers PhpParser\Autoloader as an SPL autoloader.
  *
  * @param bool $prepend Whether to prepend the autoloader instead of appending
  */
 public static function register($prepend = false)
 {
     if (self::$registered === true) {
         return;
     }
     spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend);
     self::$registered = true;
 }
Пример #2
0
 /**
  * Registers PhpParser\Autoloader as an SPL autoloader.
  *
  * @param bool $prepend
  *        	Whether to prepend the autoloader instead of appending
  */
 public static function register($prepend = false)
 {
     if (self::$registered === true) {
         return;
     }
     spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend);
     self::$registered = true;
     self::$runningOnPhp7 = version_compare(PHP_VERSION, '7.0-dev', '>=');
 }