/** * Returns an instance for a request which is * JSON-formatted * @return \static */ public static function get() { $req = new static(); $post = \file_get_contents('php://input'); if ($post !== false) { $obj = Json::deserialise($post); if ($obj !== null) { $req->_Obj = $obj; } } return $req; }
/** * Assigns the JSON string properties to $this * @param string $content */ public function deserialise($content) { $this->Data = Json::deserialise($content); }