mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00

* fixed installing samples when for example Rook Sample already exist and other samples not * fixed some mysql error when character you trying to create already exist * fixed signature fonts finding path * removed DEFAULT '' for TEXT field. It didn't worked under some systems like MAC OS X. * moved news adding at installation from schema.sql to finish.php * removed some unused cities field from myaac_spells table * some optimizations
39 lines
954 B
PHP
39 lines
954 B
PHP
<?php
|
|
/*
|
|
* This file is part of Twig.
|
|
*
|
|
* (c) 2009 Fabien Potencier
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
/**
|
|
* Autoloads Twig classes.
|
|
*
|
|
* @author Fabien Potencier <fabien@symfony.com>
|
|
*/
|
|
class Twig_Autoloader
|
|
{
|
|
/**
|
|
* Registers Twig_Autoloader as an SPL autoloader.
|
|
*/
|
|
public static function register()
|
|
{
|
|
ini_set('unserialize_callback_func', 'spl_autoload_call');
|
|
spl_autoload_register(array(new self, 'autoload'));
|
|
}
|
|
/**
|
|
* Handles autoloading of classes.
|
|
*
|
|
* @param string $class A class name.
|
|
*/
|
|
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;
|
|
}
|
|
}
|
|
} |