Exemplo n.º 1
0
 public function request($verb, array $params = [])
 {
     parent::request($verb, $params);
     if ($verb == \Carbo\Http\Verb::Post) {
         $this->form_data->insert($this->table, @$_POST['row'], @$_FILES['row'], @$_POST['link']);
         $this->headers['Location'] = '..';
         $this->code = \Carbo\Http\Code::Found;
     }
 }
Exemplo n.º 2
0
 public function request($verb, array $params = [])
 {
     parent::request($verb, $params);
     if (isset($params['key'])) {
         foreach ($this->table->columns as $column) {
             if ($column->name == $params['key']) {
                 $this->key = $column->name;
             }
         }
     }
     if ($this->key == null) {
         throw new \Carbo\Http\CodeException(\Carbo\Http\Code::NotFound);
     }
     if (isset($params['value'])) {
         $this->value = $params['value'];
     }
 }