You are here

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

Same name and namespace in other branches
  1. 6.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 28

Class

Twig_Autoloader
Autoloads Twig classes.

Code

public static function register($prepend = false) {
  @trigger_error('Using Twig_Autoloader is deprecated. Use Composer instead.', E_USER_DEPRECATED);
  if (PHP_VERSION_ID < 50300) {
    spl_autoload_register(array(
      __CLASS__,
      'autoload',
    ));
  }
  else {
    spl_autoload_register(array(
      __CLASS__,
      'autoload',
    ), true, $prepend);
  }
}