14 protected $endpoint = array(
'MODULE_ID' =>
'',
'CODE' =>
'');
54 $this->
setEndpoint($settings[
'CODE'], $settings[
'MODULE_ID']);
60 $this->
setInterval($settings[
'SEND_INTERVAL'], $settings[
'SEND_INTERVAL_UNIT']);
79 'IS_CLOSED_TRIGGER' => ($trigger->isClosed() ?
'Y' :
'N'),
80 'CAN_RUN_FOR_OLD_DATA' => ($trigger->canRunForOldData() ?
'Y' :
'N'),
81 'CLOSED_TRIGGER_INTERVAL' =>
'1440',
82 'CLOSED_TRIGGER_TIME' =>
'00:00',
83 'EVENT_MODULE_ID' => $trigger->getEventModuleId(),
84 'EVENT_TYPE' => $trigger->getEventType(),
131 return (isset($this->endpoint[$key]) ? $this->endpoint[$key] :
'');
145 $this->endpoint[
'CODE'] = $code;
146 if(!empty($moduleId))
147 $this->endpoint[
'MODULE_ID'] = $moduleId;
173 if(is_string($state))
175 $state = ($state ==
'Y' ? true :
false);
178 $this->typeStart = (bool) $state;
195 if(is_string($state))
197 $state = ($state ==
'Y' ? true :
false);
200 $this->eventOccur = (bool) $state;
225 if(is_string($state))
227 $state = ($state ==
'Y' ? true :
false);
231 $this->preventEmail = (bool) $state;
248 if(is_string($state))
250 $state = ($state ==
'Y' ? true :
false);
276 $this->closedTriggerTime = (string) $time;
295 $this->closedTriggerInterval = (int) $interval;
304 if(is_string($state))
306 $state = ($state ==
'Y' ? true :
false);
309 $this->runForOldData = (bool) $state;
326 if(is_string($state))
328 $state = ($state ==
'Y' ? true :
false);
348 $this->eventModuleId = $moduleId;
381 if(!empty($this->eventModuleId) && !empty($this->eventType))
403 if($value <= 0)
return 0;
419 return $value * $koeff;
getClosedTriggerInterval()
static getArrayFromTrigger(Base $trigger)
setInterval($value=0, $type='H')
__construct(array $settings=null)
setEndpoint($code, $moduleId)
setIntervalType($intervalType)
setIntervalValue($intervalValue)
setClosedTriggerInterval($interval)
setWasRunForOldData($state)
setEventModuleId($moduleId)
setClosedTriggerTime($time)