本文整理汇总了PHP中Vtiger_Utils::Log方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Utils::Log方法的具体用法?PHP Vtiger_Utils::Log怎么用?PHP Vtiger_Utils::Log使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Utils
的用法示例。
在下文中一共展示了Vtiger_Utils::Log方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: registerCustomWebservices
function registerCustomWebservices($operations)
{
global $adb;
foreach ($operations as $operation_name => $operation_info) {
$checkres = $adb->pquery("SELECT operationid FROM vtiger_ws_operation WHERE name=?", array($operation_name));
if ($checkres && $adb->num_rows($checkres) < 1) {
$operation_id = $adb->getUniqueId('vtiger_ws_operation');
$operation_res = $adb->pquery("INSERT INTO vtiger_ws_operation (operationid, name, handler_path, handler_method, type, prelogin) \n\t\t\t\t\tVALUES (?,?,?,?,?,?)", array($operation_id, $operation_name, $operation_info['file'], $operation_info['handler'], $operation_info['reqtype'], $operation_info['prelogin']));
$operation_parameters = $operation_info['parameters'];
$parameter_index = 0;
foreach ($operation_parameters as $parameter_name => $parameter_type) {
$adb->pquery("INSERT INTO vtiger_ws_operation_parameters (operationid, name, type, sequence) \n\t\t\t\t\t\tVALUES(?,?,?,?)", array($operation_id, $parameter_name, $parameter_type, $parameter_index + 1));
++$parameter_index;
}
Vtiger_Utils::Log("Opearation {$operation_name} enabled successfully.");
} else {
Vtiger_Utils::Log("Operation {$operation_name} already exists.");
}
}
}
示例2: log
/**
* Helper function to log messages
* @param String Message to log
* @param Boolean true appends linebreak, false to avoid it
* @access private
*/
static function log($message, $delim = true)
{
Vtiger_Utils::Log($message, $delim);
}
示例3: unsetRelatedModules
/**
* Remove relation between the field and modules (UIType 10)
* @param Array List of module names
*/
function unsetRelatedModules($moduleNames)
{
global $adb;
foreach ($moduleNames as $relmodule) {
$adb->pquery('DELETE FROM vtiger_fieldmodulerel WHERE fieldid=? AND module=? AND relmodule = ?', array($this->id, $this->getModuleName(), $relmodule));
Vtiger_Utils::Log("Unsetting {$this->name} relation with {$relmodule} ... DONE");
}
return true;
}
示例4: checkArg
/**
* Funkcja sprawdza czy wszystkie wymagane parametry funkcji zostały podane.
* W razie braku wszystkich parametrów dopisuje do logu odpowiednią informację
*
* @param array $parameterList lista parametrów
* @param int $numMandatoryArg liczba wymaganych paramtrów przez funkcję
* @return bool W zależności od tego czy wszystkie paramtry zostały podane (true) czy nie (false)
*/
private static function checkArg($parameterList, $numMandatoryArg)
{
vglobal('Vtiger_Utils_Log', TRUE);
for ($i = 0; $i < $numMandatoryArg; $i++) {
if (empty($parameterList[$i])) {
$i++;
Vtiger_Utils::Log($i . ' function parameter is empty');
return FALSE;
}
}
return TRUE;
}
示例5: register
function register()
{
$adb = PearDatabase::getInstance();
$checkresult = $adb->pquery("SELECT 1 FROM vtiger_ws_operation WHERE name = ?", array($this->opName));
if ($adb->num_rows($checkresult)) {
return;
}
Vtiger_Utils::Log("Enabling webservice operation {$this->opName}", true);
$operationid = vtws_addWebserviceOperation($this->opName, $this->opFile, $this->opClass, $this->opType);
for ($index = 0; $index < count($this->parameters); ++$index) {
vtws_addWebserviceOperationParam($operationid, $this->parameters[$index]['name'], $this->parameters[$index]['type'], $index + 1);
}
}