/** * 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); } }