30 protected static $map = array();
69 $lname = strtolower(
$name);
72 if (isset($loaded[
$type][$lname])) {
73 return $loaded[
$type][$lname];
76 if (class_exists($lname,
false)) {
77 $loaded[
$type][$lname] =
true;
83 $isloaded = self::loadFramework($lname);
88 if ($isloaded = self::loadClass(
$name)) {
91 $isloaded = self::loadCore($lname);
94 $isloaded = self::loadModule($lname,
$type);
97 $loaded[
$type][$lname] = $isloaded;
99 return $loaded[
$type][$lname];
115 if (class_exists($name) && method_exists($name,
'__autoload')) {
116 call_user_func(array($name,
'__autoload'));
123 $class =
'Xoops' . ucfirst($name);
124 if (class_exists($class)) {
128 'Class ' . $name .
' not found in file ' . __FILE__ .
'at line ' . __LINE__,
157 $class =
'Xoops' . ucfirst($name);
158 if (class_exists($class,
false)) {
180 if (class_exists(ucfirst(
$dirname) . ucfirst($name))) {
202 'formdhtmltextarea' =>
$xoops_root_path .
'/class/xoopseditor/dhtmltextarea/dhtmltextarea.php',
203 'formtextarea' =>
$xoops_root_path .
'/class/xoopseditor/textarea/textarea.php',
207 'mytextsanitizerextension' =>
$xoops_root_path .
'/class/module.textsanitizer.php',
209 'rssauthorhandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
210 'rsscategoryhandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
211 'rsscommentshandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
212 'rsscopyrighthandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
213 'rssdescriptionhandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
215 'rssgeneratorhandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
217 'rssheighthandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
220 'rsslanguagehandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
221 'rsslastbuilddatehandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
223 'rssmanagingeditorhandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
225 'rsspubdatehandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
226 'rsssourcehandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
227 'rsstextinputhandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
231 'rsswebmasterhandler' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
255 'xoopsblockmodulelinkhandler' =>
$xoops_root_path .
'/kernel/blockmodulelink.php',
258 'xoopscaptchamethod' =>
$xoops_root_path .
'/class/captcha/xoopscaptchamethod.php',
260 'xoopscaptcharecaptcha' =>
$xoops_root_path .
'/class/captcha/recaptcha.php',
262 'xoopscaptchaimagehandler' =>
$xoops_root_path .
'/class/captcha/image/scripts/imageclass.php',
272 'xoopsconfigoptionhandler' =>
$xoops_root_path .
'/kernel/configoption.php',
276 'xoopsdatabasefactory' =>
$xoops_root_path .
'/class/database/databasefactory.php',
279 'xoopsmysqldatabase' =>
$xoops_root_path .
'/class/database/mysqldatabase.php',
280 'xoopsmysqldatabaseproxy' =>
$xoops_root_path .
'/class/database/mysqldatabaseproxy.php',
281 'xoopsmysqldatabasesafe' =>
$xoops_root_path .
'/class/database/mysqldatabasesafe.php',
299 'xoopseditorhandler' =>
$xoops_root_path .
'/class/xoopseditor/xoopseditor.php',
306 'xoopsformbuttontray' =>
$xoops_root_path .
'/class/xoopsform/formbuttontray.php',
308 'xoopsformcaptcha' =>
$xoops_root_path .
'/class/xoopsform/formcaptcha.php',
309 'xoopsformcheckbox' =>
$xoops_root_path .
'/class/xoopsform/formcheckbox.php',
310 'xoopsformcolorpicker' =>
$xoops_root_path .
'/class/xoopsform/formcolorpicker.php',
311 'xoopsformcontainer' =>
$xoops_root_path .
'/class/xoopsform/formcontainer.php',
312 'xoopsformdatetime' =>
$xoops_root_path .
'/class/xoopsform/formdatetime.php',
313 'xoopsformdhtmltextarea' =>
$xoops_root_path .
'/class/xoopsform/formdhtmltextarea.php',
315 'xoopsformelement' =>
$xoops_root_path .
'/class/xoopsform/formelement.php',
316 'xoopsformelementtray' =>
$xoops_root_path .
'/class/xoopsform/formelementtray.php',
319 'xoopsformhiddentoken' =>
$xoops_root_path .
'/class/xoopsform/formhiddentoken.php',
322 'xoopsformpassword' =>
$xoops_root_path .
'/class/xoopsform/formpassword.php',
324 'xoopsformradioyn' =>
$xoops_root_path .
'/class/xoopsform/formradioyn.php',
327 'xoopsformselectcheckgroup' =>
$xoops_root_path .
'/class/xoopsform/formselectcheckgroup.php',
328 'xoopsformselectcountry' =>
$xoops_root_path .
'/class/xoopsform/formselectcountry.php',
329 'xoopsformselecteditor' =>
$xoops_root_path .
'/class/xoopsform/formselecteditor.php',
330 'xoopsformselectgroup' =>
$xoops_root_path .
'/class/xoopsform/formselectgroup.php',
331 'xoopsformselectlang' =>
$xoops_root_path .
'/class/xoopsform/formselectlang.php',
332 'xoopsformselectlocale' =>
$xoops_root_path .
'/class/xoopsform/formselectlocale.php',
333 'xoopsformselectmatchoption' =>
$xoops_root_path .
'/class/xoopsform/formselectmatchoption.php',
334 'xoopsformselecttheme' =>
$xoops_root_path .
'/class/xoopsform/formselecttheme.php',
335 'xoopsformselecttimezone' =>
$xoops_root_path .
'/class/xoopsform/formselecttimezone.php',
336 'xoopsformselectuser' =>
$xoops_root_path .
'/class/xoopsform/formselectuser.php',
338 'xoopsformtabtray' =>
$xoops_root_path .
'/class/xoopsform/formtabtray.php',
340 'xoopsformtextarea' =>
$xoops_root_path .
'/class/xoopsform/formtextarea.php',
341 'xoopsformtextdateselect' =>
$xoops_root_path .
'/class/xoopsform/formtextdateselect.php',
344 'xoopsgroupformcheckbox' =>
$xoops_root_path .
'/class/xoopsform/grouppermform.php',
345 'xoopsgrouppermform' =>
$xoops_root_path .
'/class/xoopsform/grouppermform.php',
384 'xoopsthemesetparser' =>
$xoops_root_path .
'/class/xml/themesetparser.php',
403 'xoopsxmlrpcparser' =>
$xoops_root_path .
'/class/xml/rpc/xmlrpcparser.php',
409 'xoopsxmlrss2parser' =>
$xoops_root_path .
'/class/xml/rss/xmlrss2parser.php',
426 if (is_array($data)) {
431 } elseif (
$xoops->isModule()) {
456 self::securityCheck(
$file);
457 if (self::fileExists(
$file)) {
479 if (class_exists($class,
false) || interface_exists($class,
false)) {
488 if (!class_exists($class,
false) && !interface_exists($class,
false)) {
492 if (method_exists($class,
'__autoload')) {
493 call_user_func(array($class,
'__autoload'));
508 static $included = array();
509 if (!isset($included[
$file])) {
510 $included[
$file] = file_exists($file);
513 return $included[
$file];
528 if (preg_match(
'/[^a-z0-9\\/\\\\_.:-]/i', $filename)) {
529 exit(
'Security check: Illegal character in filename');
542 static $libPath = null;
544 if ($libPath === null) {
545 $loaderPath =
$path .
'/vendor/autoload.php';
546 if (self::fileExists($loaderPath)) {
551 spl_autoload_register(array(
'XoopsLoad',
'load'));
static startAutoloader($path)
static loadConfig($data=null)
if(!isset($xoops->paths[$path_type])) if($path_type== 'var') $file
static securityCheck($filename)
defined('DS') or define('DS' DIRECTORY_SEPARATOR
if(DIRECTORY_SEPARATOR!="/") $xoops_root_path
static loadModule($name, $dirname=null)
static load($name, $type="core")
static loadFile($file, $once=true)
static loadFramework($name)
static addMap(array $map)