本文整理汇总了PHP中QControl::_CallActionMethod方法的典型用法代码示例。如果您正苦于以下问题:PHP QControl::_CallActionMethod方法的具体用法?PHP QControl::_CallActionMethod怎么用?PHP QControl::_CallActionMethod使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QControl
的用法示例。
在下文中一共展示了QControl::_CallActionMethod方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: TriggerMethod
/**
* Triggers an event handler method for a given control ID
* NOTE: Parameters must be already validated and are guaranteed to exist.
*
* @param string $strControlId Control ID triggering the method
* @param string $strMethodName Method name which has to be fired. Includes a control id if a control action.
* @param QAction $objAction The action object which caused the event
*/
protected function TriggerMethod($strControlId, $strMethodName, QAction $objAction)
{
$mixParameter = $_POST['Qform__FormParameter'];
$objSourceControl = $this->objControlArray[$strControlId];
$params = QControl::_ProcessActionParams($objSourceControl, $objAction, $mixParameter);
if (strpos($strMethodName, '::')) {
// Calling a static method in a class
$f = explode('::', $strMethodName);
if (is_callable($f)) {
$f($this->strFormId, $params['controlId'], $params['param'], $params);
}
} elseif (($intPosition = strpos($strMethodName, ':')) !== false) {
$strDestControlId = substr($strMethodName, 0, $intPosition);
$strMethodName = substr($strMethodName, $intPosition + 1);
$objDestControl = $this->objControlArray[$strDestControlId];
QControl::_CallActionMethod($objDestControl, $strMethodName, $this->strFormId, $params);
} else {
$this->{$strMethodName}($this->strFormId, $params['controlId'], $params['param'], $params);
}
}