Пример #1
0
 /**
  * Set the visibility of the choice.
  * 
  * @param integer $showHide A value from the ShowHide enumeration.
  * @throws InvalidArgumentException If $showHide is not a value from the ShowHide enumeration.
  */
 public function setShowHide($showHide)
 {
     if (in_array($showHide, ShowHide::asArray()) === true) {
         $this->showHide = $showHide;
     } else {
         $msg = "The 'showHide' argument must be a value from the ShowHide enumeration.";
         throw new InvalidArgumentException($msg);
     }
 }
Пример #2
0
 /**
  * Set how the feedback should be displayed.
  *
  * @param boolean $showHide A value from the ShowHide enumeration.
  * @throws \InvalidArgumentException If $showHide is not a value from the ShowHide enumeration.
  */
 public function setShowHide($showHide)
 {
     if (in_array($showHide, ShowHide::asArray())) {
         $this->showHide = $showHide;
     } else {
         $msg = "'{$showHide}' is not a value from the ShowHide enumeration.";
         throw new InvalidArgumentException($msg);
     }
 }