1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +02:00

Moved autoload responsibility to e107_class.php

Instead of every independently operating client code figuring out its
own autoload policies, the e107 class file e107_class.php now takes care
of autoloading.

Any client that uses the e107 class will automatically benefit from
autoloading for e107.

This cuts down on potential code duplication, and e107::getSingleton()
is no longer tied to trying to figure out the class path.

This commit REMOVES support for the unused constant flag
E107_DISABLE_AUTOLOAD introduced in
bdef2707b4 and the unused autoload code
introduced in f4cee92890.
This commit is contained in:
Nick Liu
2018-10-31 08:22:14 -05:00
parent ee1a5b1278
commit 4c6828be93
4 changed files with 9 additions and 80 deletions

View File

@@ -163,18 +163,6 @@ if($e107->initInstall($e107_paths, $ebase, $override)===false)
unset($e107_paths,$override,$ebase);
### NEW Register Autoload - do it asap
if(!function_exists('spl_autoload_register'))
{
// PHP >= 5.1.2 required
die_fatal_error('Fatal exception - spl_autoload_* required.');
}
// register core autoload
e107::autoload_register(array('e107', 'autoload'));
// NEW - session handler
require_once(e_HANDLER.'session_handler.php');
define('e_SECURITY_LEVEL', e_session::SECURITY_LEVEL_NONE);