示例#1
0
 /** static shortcut method */
 public static function api($verb, $url, $data = null)
 {
     $rest = new RestApi();
     if (!$rest->verbIsValid($verb)) {
         throw new \Exception("Verb '{$verb}' is invalid");
     }
     return $rest->{$verb}($url, $data);
 }