if(MFile::is($name)){ self::$lookUp = MFile::parseData($name, true, false); }else{ self::$lookUp = new stdClass(); } } } /** * * @param string $ext the extension of the file * @param int|bool $isBigIcon path is big icons or small icons */ public static function _($ext = "default", $isBigIcon = 0){ $ext = strtolower(trim($ext)); $path = $isBigIcon ? _FM_HOME_DIR.DS."images".DS."bigicons".DS : _FM_HOME_DIR.DS."images".DS."icons".DS; $uri = $isBigIcon ? _FM_HOME_FOLDER.'/images/bigicons/' : _FM_HOME_FOLDER.'/images/icons/'; $iconName = (isset(self::$lookUp->$ext)) ? self::$lookUp->$ext : $ext; $iconName = MFile::is($path.$iconName . ".png") ? $iconName : "default"; return $uri . $iconName . ".png"; } public static function getLookUp(){ return self::$lookUp; } }//EOF class MIcon::init(); ?>