/** * 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; }
/** * Serialises $this to a JSON string * @return string */ public function serialise() { return Json::serialise($this); }
/** * Formats the current object to a JSON-formatted string * IMPORTANT! This will serialise all public properties * @return string */ public function toJsonString() { return Json::serialise($this); }
/** * Assigns the JSON string properties to $this * @param string $content */ public function deserialise($content) { $this->Data = Json::deserialise($content); }