/** * @public * * Methode um autretende Events zu processen * * @param integer $variable ID der auslösenden Variable * @param string $value Wert der Variable */ public function HandleEvent($variable, $value) { $configurationAuto = self::Get_EventConfigurationAuto(); $configurationCust = self::Get_EventConfigurationCust(); if (array_key_exists($variable, $configurationCust)) { $params = $configurationCust[$variable]; } elseif (array_key_exists($variable, $configurationAuto)) { $params = $configurationAuto[$variable]; //} elseif ($variable==IPSMH_IRTRANS_BUTTON_VARIABLE_ID) { //$params = ''; //$this->HandleIREvent($variable, $value); } else { $params = ''; IPSLogger_Wrn(__file__, 'Variable '.$variable.' NOT found in IPSMessageHandler Configuration!'); } if ($params<>'') { if (count($params) < 3) { throw new IPSMessageHandlerException('Invalid IPSMessageHandler Configuration, Event Defintion needs 3 parameters'); } $component = IPSComponent::CreateObjectByParams($params[1]); $module = IPSModule::CreateObjectByParams($params[2]); if (function_exists('IPSMessageHandler_BeforeHandleEvent')) { if (IPSMessageHandler_BeforeHandleEvent($variable, $value, $component, $module)) { $component->HandleEvent($variable, $value, $module); if (function_exists('IPSMessageHandler_AfterHandleEvent')) { IPSMessageHandler_AfterHandleEvent($variable, $value, $component, $module); } } } else { $component->HandleEvent($variable, $value, $module); if (function_exists('IPSMessageHandler_AfterHandleEvent')) { IPSMessageHandler_AfterHandleEvent($variable, $value, $component, $module); } } } }