public static function register($base = false)
{
/* deprecated since 2.19.0
if (defined('COMPILER_INCLUDE_PATH'))
{
$paths = array();
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'local';
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community';
#$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core';
#$paths[] = BP . DS . 'lib';
$appPath = implode(PS, $paths);
set_include_path($appPath . PS . get_include_path());
}
*/
$rewriter = new Aitoc_Aitsys_Model_Rewriter();
$rewriter->preRegisterAutoloader($base);
// unregistering all, and varien autoloaders to make our performing first
$autoloaders = spl_autoload_functions();
if ($autoloaders and is_array($autoloaders) && !empty($autoloaders)) {
foreach ($autoloaders as $autoloader) {
spl_autoload_unregister($autoloader);
}
}
if (version_compare(Mage::getVersion(), '1.3.1', '>')) {
spl_autoload_unregister(array(Varien_Autoload::instance(), 'autoload'));
}
spl_autoload_register(array(self::instance(), 'autoload'), false);
if (version_compare(Mage::getVersion(), '1.3.1', '>')) {
Varien_Autoload::register();
} else {
spl_autoload_register(array(self::instance(), 'performStandardAutoload'));
#self::_loadOverwrittenClasses();
}
}