public static function &getInstance() { static $instance; if (!isset($instance)) { $instance = new MyBlocksAdminForICMS(); $instance->construct(); } return $instance; }
include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; // language file altsys_include_language_file('myblocksadmin'); // fork by core types switch (altsys_get_core_type()) { case ALTSYS_CORE_TYPE_X22: include_once dirname(__FILE__) . '/class/MyBlocksAdminForX22.class.php'; $myba =& MyBlocksAdminForX22::getInstance(); break; case ALTSYS_CORE_TYPE_XCL21: include_once dirname(__FILE__) . '/class/MyBlocksAdminForXCL21.class.php'; $myba =& MyBlocksAdminForXCL21::getInstance(); break; case ALTSYS_CORE_TYPE_ICMS: include_once dirname(__FILE__) . '/class/MyBlocksAdminForICMS.class.php'; $myba =& MyBlocksAdminForICMS::getInstance(); break; case ALTSYS_CORE_TYPE_X20S: case ALTSYS_CORE_TYPE_X23P: include_once dirname(__FILE__) . '/class/MyBlocksAdminForX20S.class.php'; $myba =& MyBlocksAdminForX20S::getInstance(); break; default: include_once dirname(__FILE__) . '/class/MyBlocksAdmin.class.php'; $myba =& MyBlocksAdmin::getInstance(); break; } // permission $myba->checkPermission(); // set parameters target_mid , target_dirname etc. $myba->init($xoopsModule);