示例#1
0
 /**
  * {@inheritdoc}
  */
 public function addRule(RuleInterface $rule)
 {
     if (!$this->hasRule($rule)) {
         $rule->setMethod($this);
         $this->rules->add($rule);
     }
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function addRule(RuleInterface $rule)
 {
     if (!$this->hasRule($rule)) {
         $rule->setPromotion($this);
         $this->rules->add($rule);
     }
     return $this;
 }