/** * Add verbs that are to be allowed on this route. * @param mixed $verbs = a single or array of verbs valid for this route. eg array('GET', 'PUT') * @throws DrestException if verb is invalid */ public function setVerbs($verbs) { $verbs = (array) $verbs; foreach ($verbs as $verb) { $verb = strtoupper($verb); if (!defined('DrestCommon\\Request\\Request::METHOD_' . $verb)) { throw DrestException::invalidHttpVerbUsed($verb); } $this->verbs[] = $verb; } }