Beispiel #1
0
 /**
  * Set whether we would like to expose this route (and its verbs) to OPTIONS requests
  * @param  integer|boolean $value - if using integer -1 to unset, 0 for no and 1 if yes
  * @throws DrestException
  */
 public function setAllowedOptionRequest($value = true)
 {
     if (is_bool($value)) {
         $this->allowed_option_request = $value ? 1 : 0;
     } elseif ($value != -1) {
         throw DrestException::invalidAllowedOptionsValue();
     }
     $this->allowed_option_request = $value;
 }