PEEL Shopping
Open source ecommerce : PEEL Shopping
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 
18 {
24  public static function register($prepend = false)
25  {
26  if (version_compare(phpversion(), '5.3.0', '>=')) {
27  spl_autoload_register(array(new self, 'autoload'), true, $prepend);
28  } else {
29  spl_autoload_register(array(new self, 'autoload'));
30  }
31  }
32 
38  public static function autoload($class)
39  {
40  if (0 !== strpos($class, 'Twig')) {
41  return;
42  }
43 
44  if (is_file($file = $GLOBALS['dirroot'] . "/lib/templateEngines/".str_replace(array('_', "\0", 'Twig'), array('/', '', 'twig'), $class).'.php')) {
45  require $file;
46  }
47  }
48 }
static autoload($class)
Handles autoloading of classes.
Definition: Autoloader.php:38
if($rub=fetch_assoc($rub_query)) if(check_if_module_active('url_rewriting')) $class
Definition: index.php:68
Autoloads Twig classes.
Definition: Autoloader.php:17
$GLOBALS['page_columns_count']

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:18 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.