コード例 #1
0
ファイル: VardefManager.php プロジェクト: omusico/sugar_work
 /**
  * clear out the vardef cache. If we receive a module name then just clear the vardef cache for that module
  * otherwise clear out the cache for every module
  * @param string module_dir the module_dir to clear, if not specified then clear
  *                      clear vardef cache for all modules.
  * @param string object_name the name of the object we are clearing this is for sugar_cache
  */
 static function clearVardef($module_dir = '', $object_name = '')
 {
     //if we have a module name specified then just remove that vardef file
     //otherwise go through each module and remove the vardefs.php
     if (!empty($module_dir) && !empty($object_name)) {
         VardefManager::_clearCache($module_dir, $object_name);
     } else {
         global $beanList;
         foreach ($beanList as $module_dir => $object_name) {
             VardefManager::_clearCache($module_dir, $object_name);
         }
     }
 }