You are here

public static function Twig_Autoloader::register in Zircon Profile 8

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

Registers Twig_Autoloader as an SPL autoloader.

Parameters

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

1 call to Twig_Autoloader::register()
bootstrap.php in vendor/twig/twig/test/bootstrap.php

File

vendor/twig/twig/lib/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);
  }
}