Example #1
0
File: Post.php Project: romeoz/rock
 public function get()
 {
     if (is_array($this->filters)) {
         $this->filters = Sanitize::rules($this->filters);
     }
     return Request::post($this->name, $this->default, $this->filters);
 }
Example #2
0
 protected function getGlobalsVars()
 {
     if ($this->request->isPost() && in_array('POST', $this->verbs, true)) {
         return Request::post();
     }
     if ($this->request->isGet() && in_array('GET', $this->verbs, true)) {
         return Request::get();
     }
     if ($this->request->isPut() && in_array('PUT', $this->verbs, true)) {
         return Request::post();
     }
     if ($this->request->isDelete() && in_array('DELETE', $this->verbs, true)) {
         return Request::post();
     }
     return [];
 }