You are here

public static function Twig_Autoloader::register in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/Autoloader.php \Twig_Autoloader::register()

Registers Twig_Autoloader as an SPL autoloader.

Parameters

bool $prepend Whether to prepend the autoloader or not.:

File

vendor/Twig/Autoloader.php, line 24

Class

Twig_Autoloader
Autoloads Twig classes.

Code

public static function register($prepend = false) {
  if (version_compare(phpversion(), '5.3.0', '>=')) {
    spl_autoload_register(array(
      __CLASS__,
      'autoload',
    ), true, $prepend);
  }
  else {
    spl_autoload_register(array(
      __CLASS__,
      'autoload',
    ));
  }
}