public function __construct() { parent::__construct(); // Set the module configuration file, based on the CLASS name, adding a .cfg; $this->setModuleConfigFile($this->getObjectCLASS()->appendString('.cfg')); if (!TheFactoryMethodOfSingleton::checkHasInstance(__CLASS__)) { self::setExeTime(new S(__CLASS__)); if ($this->objIdentificationString == __CLASS__) { // Instantiate some types; self::$objRegisteredModules = new A(); self::$objRegisteredClasses = new A(); // Scan for module directory, in the MOD_DIR dir; if (!isset($_SESSION[PROJECT_NAME]['RA_mod_reg'])) { $scannedModuleDirectory = new FileDirectory(MOD_DIR); $_SESSION[PROJECT_NAME]['RA_mod_reg']['scandir'] = $scannedModuleDirectory->scanDirectory($_SESSION[PROJECT_NAME]['RA_mod_reg']['f_count']); } // Do the FOR; for ($i = 0; $i < $_SESSION[PROJECT_NAME]['RA_mod_reg']['f_count']; ++$i) { // Register new module; $this->registerModule(new FileDirectory(MOD_DIR . _S . $_SESSION[PROJECT_NAME]['RA_mod_reg']['scandir'][$i])); } } } else { // Return the instantiated object; return TheFactoryMethodOfSingleton::getInstance(__CLASS__); } }