예제 #1
0
 /**
  * Returns a map with trigger types, mapped to the class representing that type.
  *
  * @return array
  */
 protected static function getTriggerTypes() : array
 {
     if (count(self::$triggerTypes) === 0) {
         self::$triggerTypes = Domain::getRuleTriggers();
     }
     return self::$triggerTypes;
 }
예제 #2
0
 /**
  * Processor constructor.
  *
  * @param Rule               $rule
  * @param TransactionJournal $journal
  */
 public function __construct(Rule $rule, TransactionJournal $journal)
 {
     $this->rule = $rule;
     $this->journal = $journal;
     $this->triggerTypes = Domain::getRuleTriggers();
     $this->actionTypes = Domain::getRuleActions();
 }