function addMap($bigSt, $smallSt, $clearedSt) { $log = new Log(self::TAG); $hexBig = bin2hex($bigSt); $hexSmall = bin2hex($smallSt); if (!isset(self::$data[$hexBig])) { self::$data[$hexBig] = array(self::TYPE_BIG => $bigSt, self::TYPE_SMALL => $smallSt, self::TYPE_CLEARED => $clearedSt, self::TYPE_LANG => $this->lang); } else { $log->e("{$bigSt} already saved"); } if (!isset(self::$data[$hexSmall])) { self::$data[$hexSmall] = array(self::TYPE_BIG => $bigSt, self::TYPE_SMALL => $smallSt, self::TYPE_CLEARED => $clearedSt, self::TYPE_LANG => $this->lang); } else { $log->e("{$smallSt} already saved"); } }
function __construct() { $log = new Log(self::TAG); $this->loadedClasses = new HashMap(); ResourceManager::addResource(self::RES_NAME, System::getClassStorage(__CLASS__), self::RES_FILETYPE); $res = ResourceManager::getResource(self::RES_NAME, true); foreach ($res->getIndex() as $fileName => $fileInfo) { $className = str_replace(".", "\\", $fileName); if (class_exists($className)) { new $className(); $log->i(self::TAG . ".load({$className}) loaded."); $this->loadedClasses->add($className); } else { $log->e(self::TAG . ".load({$className}) process failed"); } } }