check_request_method() 공개 정적인 메소드

Checks whether the correct HTTP method was used for the request
public static check_request_method ( array $expected )
$expected array Expected HTTP methods for the request
예제 #1
0
 /**
  * Handle incoming requests for the Atom entry collection for comments on an entry
  */
 function act_entry_comments()
 {
     Utils::check_request_method(array('GET', 'HEAD', 'POST'));
     if (isset($this->handler_vars['slug'])) {
         $this->act_comments(array('slug' => $this->handler_vars['slug']));
     } else {
         $this->act_comments(array('id' => $this->handler_vars['id']));
     }
 }