You are here

public static function Twig_Autoloader::autoload in Zircon Profile 8

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

Handles autoloading of classes.

Parameters

string $class A class name.:

File

vendor/twig/twig/lib/Twig/Autoloader.php, line 44

Class

Twig_Autoloader
Autoloads Twig classes.

Code

public static function autoload($class) {
  if (0 !== strpos($class, 'Twig')) {
    return;
  }
  if (is_file($file = dirname(__FILE__) . '/../' . str_replace(array(
    '_',
    "\0",
  ), array(
    '/',
    '',
  ), $class) . '.php')) {
    require $file;
  }
}