当前位置: 首页>>代码示例>>PHP>>正文


PHP Vtiger_Utils::isNumber方法代码示例

本文整理汇总了PHP中Vtiger_Utils::isNumber方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Utils::isNumber方法的具体用法?PHP Vtiger_Utils::isNumber怎么用?PHP Vtiger_Utils::isNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Vtiger_Utils的用法示例。


在下文中一共展示了Vtiger_Utils::isNumber方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getInstance

 public static function getInstance($value)
 {
     $db = PearDatabase::getInstance();
     if (Vtiger_Utils::isNumber($value)) {
         $sql = 'SELECT * FROM vtiger_org_share_action_mapping WHERE share_action_id = ?';
     } else {
         $sql = 'SELECT * FROM vtiger_org_share_action_mapping WHERE share_action_name = ?';
     }
     $params = array($value);
     $result = $db->pquery($sql, $params);
     if ($db->num_rows($result) > 0) {
         return self::getInstanceFromQResult($result);
     }
     return null;
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:15,代码来源:Action.php

示例2: getInstance

 public static function getInstance($id)
 {
     $db = PearDatabase::getInstance();
     if (Vtiger_Utils::isNumber($id)) {
         $query = 'SELECT * FROM ' . Settings_Currency_Module_Model::tableName . ' WHERE id=?';
     } else {
         $query = 'SELECT * FROM ' . Settings_Currency_Module_Model::tableName . ' WHERE currency_name=?';
     }
     $params = array($id);
     $result = $db->pquery($query, $params);
     if ($db->num_rows($result) > 0) {
         $instance = new self();
         $row = $db->query_result_rowdata($result, 0);
         $instance->setData($row);
     }
     return $instance;
 }
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:17,代码来源:Record.php

示例3: getInstance

 /**
  * Get instance of block
  * @param mixed block id or block label
  * @param Vtiger_Module Instance of the module if block label is passed
  */
 static function getInstance($value, $moduleInstance = false)
 {
     global $adb;
     $cache = Vtiger_Cache::getInstance();
     if ($moduleInstance && $cache->getBlockInstance($value, $moduleInstance->id)) {
         return $cache->getBlockInstance($value, $moduleInstance->id);
     } else {
         $instance = false;
         $query = false;
         $queryParams = false;
         if (Vtiger_Utils::isNumber($value)) {
             $query = "SELECT * FROM vtiger_blocks WHERE blockid=?";
             $queryParams = array($value);
         } else {
             $query = "SELECT * FROM vtiger_blocks WHERE blocklabel=? AND tabid=?";
             $queryParams = array($value, $moduleInstance->id);
         }
         $result = $adb->pquery($query, $queryParams);
         if ($adb->num_rows($result)) {
             $instance = new self();
             $instance->initialize($adb->fetch_array($result), $moduleInstance);
         }
         $cache->setBlockInstance($value, $instance->module->id, $instance);
         return $instance;
     }
 }
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:31,代码来源:Block.php

示例4: getInstance

 /**
  * Get instance by filterid or filtername
  * @param mixed filterid or filtername
  * @param Vtiger_Module Instance of the module to use when filtername is used
  */
 static function getInstance($value, $moduleInstance = false)
 {
     global $adb;
     $instance = false;
     $query = false;
     $queryParams = false;
     if (Vtiger_Utils::isNumber($value)) {
         $query = "SELECT * FROM vtiger_customview WHERE cvid=?";
         $queryParams = array($value);
     } else {
         $query = "SELECT * FROM vtiger_customview WHERE viewname=? AND entitytype=?";
         $queryParams = array($value, $moduleInstance->name);
     }
     $result = $adb->pquery($query, $queryParams);
     if ($adb->num_rows($result)) {
         $instance = new self();
         $instance->initialize($adb->fetch_array($result), $moduleInstance);
     }
     return $instance;
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:25,代码来源:Filter.php

示例5: getInstance

 /**
  * Static Function to get the instance of Vtiger Module Model for the given id or name
  * @param mixed id or name of the module
  */
 public static function getInstance($value)
 {
     $db = PearDatabase::getInstance();
     $instance = false;
     $query = false;
     if (Vtiger_Utils::isNumber($value)) {
         $query = 'SELECT * FROM vtiger_def_org_share INNER JOIN vtiger_tab ON vtiger_tab.tabid = vtiger_def_org_share.tabid WHERE vtiger_tab.tabid=?';
     } else {
         $query = 'SELECT * FROM vtiger_def_org_share INNER JOIN vtiger_tab ON vtiger_tab.tabid = vtiger_def_org_share.tabid WHERE name=?';
     }
     $result = $db->pquery($query, array($value));
     if ($db->num_rows($result)) {
         $row = $db->query_result_rowdata($result, 0);
         $instance = new Settings_SharingAccess_Module_Model();
         $instance->initialize($row);
         $instance->set('permission', $row['permission']);
         $instance->set('editstatus', $row['editstatus']);
     }
     return $instance;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:24,代码来源:Module.php

示例6: getInstance

 /**
  * Get instance of menu by label
  * @param String Menu label
  */
 static function getInstance($value)
 {
     global $adb;
     $query = false;
     $instance = false;
     if (Vtiger_Utils::isNumber($value)) {
         $query = "SELECT * FROM vtiger_parenttab WHERE parenttabid=?";
     } else {
         $query = "SELECT * FROM vtiger_parenttab WHERE parenttab_label=?";
     }
     $result = $adb->pquery($query, array($value));
     if ($adb->num_rows($result)) {
         $instance = new self();
         $instance->initialize($adb->fetch_array($result));
     }
     return $instance;
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:21,代码来源:Menu.php

示例7: getInstanceWithIdOrName

 public static function getInstanceWithIdOrName($value)
 {
     global $log;
     $log->debug("Entering Vtiger_Action_Model::getInstanceWithIdOnName(" . $value . ") method ...");
     $db = PearDatabase::getInstance();
     if (Vtiger_Utils::isNumber($value)) {
         $sql = 'SELECT * FROM vtiger_actionmapping WHERE actionid=? LIMIT 1';
     } else {
         $sql = 'SELECT * FROM vtiger_actionmapping WHERE actionname=?';
     }
     $params = array($value);
     $result = $db->pquery($sql, $params);
     if ($db->num_rows($result) > 0) {
         $log->debug("Exiting Vtiger_Action_Model::getInstanceWithIdOnName(" . $value . ") method ...");
         return self::getInstanceFromQResult($result);
     }
     $log->debug("Exiting Vtiger_Action_Model::getInstanceWithIdOnName(" . $value . ") method ...");
     return null;
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:19,代码来源:Action.php


注:本文中的Vtiger_Utils::isNumber方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。