ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Autoloader.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of Twig.
5  *
6  * (c) 2009 Fabien Potencier
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11 
12 @trigger_error('The "Twig_Extensions_Autoloader" class is deprecated since version 1.5. Use Composer instead.', E_USER_DEPRECATED);
13 
22 {
26  public static function register()
27  {
28  spl_autoload_register(array(new self(), 'autoload'));
29  }
30 
38  public static function autoload($class)
39  {
40  if (0 !== strpos($class, 'Twig_Extensions')) {
41  return;
42  }
43 
44  if (file_exists($file = __DIR__.'/../../'.str_replace('_', '/', $class).'.php')) {
45  require $file;
46  }
47  }
48 }
Autoloads Twig Extensions classes.
Definition: Autoloader.php:21
Create styles array
The data for the language used.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static autoload($class)
Handles autoloading of classes.
Definition: Autoloader.php:38