Exemplo n.º 1
0
 public static function sanitize($value)
 {
     if (is_array($value) or is_object($value)) {
         foreach ($value as $key => $val) {
             $value[$key] = JsonApiApplication::sanitize($val);
         }
     } elseif (is_string($value)) {
         if (JsonApiApplication::$magic_quotes === TRUE) {
             $value = stripslashes($value);
         }
         if (strpos($value, "\r") !== FALSE) {
             $value = str_replace(array("\r\n", "\r"), "\n", $value);
         }
     }
     return $value;
 }
Exemplo n.º 2
0
 public function action_read()
 {
     $this->data = Model::factory($this->request->controller())->Read(JsonApiApplication::sanitize($this->request->param("limit")), JsonApiApplication::sanitize($this->request->param("offset")));
 }
Exemplo n.º 3
0
 public function action_read()
 {
     $this->data = Model::factory($this->request->controller())->Read(JsonApiApplication::sanitize($this->request->param("id")));
     //echo $this->request->param('id');
 }