本文整理汇总了PHP中VTCacheUtils::updateTabidInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP VTCacheUtils::updateTabidInfo方法的具体用法?PHP VTCacheUtils::updateTabidInfo怎么用?PHP VTCacheUtils::updateTabidInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VTCacheUtils
的用法示例。
在下文中一共展示了VTCacheUtils::updateTabidInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTabModuleName
/** Function to get the tab module name for a given id
* @param $tabid -- tab id:: Type integer
* @returns $string -- string:: Type string
*/
function getTabModuleName($tabid)
{
global $log, $adb;
$log->debug("Entering getTabModuleName(" . $tabid . ") method ...");
// Lookup information in cache first
$tabname = VTCacheUtils::lookupModulename($tabid);
if ($tabname === false) {
if (file_exists('tabdata.php') && filesize('tabdata.php') != 0) {
include 'tabdata.php';
$tabname = array_search($tabid, $tab_info_array);
if ($tabname == false) {
$sql = "select name from vtiger_tab where tabid=?";
$result = $adb->pquery($sql, array($tabid));
$tabname = $adb->query_result($result, 0, "name");
}
// Update information to cache for re-use
VTCacheUtils::updateTabidInfo($tabid, $tabname);
} else {
$log->info("tab id is " . $tabid);
$sql = "select name from vtiger_tab where tabid=?";
$result = $adb->pquery($sql, array($tabid));
$tabname = $adb->query_result($result, 0, "name");
// Update information to cache for re-use
VTCacheUtils::updateTabidInfo($tabid, $tabname);
}
}
$log->debug("Exiting getTabModuleName method ...");
return $tabname;
}
示例2: getTabid
/**
* Function to get the tabid
* Takes the input as $module - module name
* returns the tabid, integer type
*/
function getTabid($module)
{
global $log;
$log->debug("Entering getTabid(" . $module . ") method ...");
// Lookup information in cache first
$tabid = VTCacheUtils::lookupTabid($module);
if ($tabid === false) {
if (file_exists('tabdata.php') && filesize('tabdata.php') != 0) {
include 'tabdata.php';
$tabid = $tab_info_array[$module];
// Update information to cache for re-use
VTCacheUtils::updateTabidInfo($tabid, $module);
} else {
$log->info("module is " . $module);
global $adb;
$sql = "select tabid from vtiger_tab where name=?";
$result = $adb->pquery($sql, array($module));
$tabid = $adb->query_result($result, 0, "tabid");
// Update information to cache for re-use
VTCacheUtils::updateTabidInfo($tabid, $module);
}
}
$log->debug("Exiting getTabid method ...");
return $tabid;
}