public function setFrequency($frequency) {
    if ($frequency >= 0 && $frequency <= 10) {
      $this->frequency = $frequency;
    }
    else {
      $this->triggerError('Invalid value for frequency advertisingSettings.');
    }
    return $this;
  }
public function setFrequency($frequency) {
    if ($frequency >= 0 && $frequency <= 10) {
      $this->frequency = $frequency;
    }
    else {
      $this->triggerError('Invalid value for frequency advertisingSettings.');
    }
    return $this;
  }
public function setFrequency ( $ frequency ) { if ( $ frequency >= 0 && $ frequency <= 10 ) { $ this -> frequency = $ frequency ; } else { $ this -> triggerError ( 'Invalid value for frequency advertisingSettings.' ) ; } return $ this ; }
Setter for frequency.

@param int $frequency
A number between 0 and 10 defining the frequency for automatically
inserting advertising components into articles.

@return $this
Setter for frequency .