Example #1
0
 /**
  * @return void
  */
 public function setAllowedHttpMethods($mixed)
 {
     if ('ALL' == $mixed) {
         return;
     } else {
         if (is_string($mixed)) {
             $parts = explode('|', $mixed);
             foreach ($parts as $methodName) {
                 if (!in_array($methodName, Request::getKnownHttpMethods())) {
                     FrameworkRuntimeError::create('Unknown HTTP method "%s"', null, $methodName)->_throw();
                 }
                 $this->allowedHttpMethods[] = $methodName;
             }
         } else {
             $this->allowedHttpMethods = $mixed;
         }
     }
 }