123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?php
- /**
- * Created by PhpStorm.
- * User: robin
- * Date: 11/23/15
- * Time: 10:47 PM
- */
-
- namespace Luticate\Utils;
-
-
- class LuRequestDbo extends LuDbo
- {
- /**
- * Specify data which should be serialized to JSON
- * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
- * @return mixed data which can be serialized by <b>json_encode</b>,
- * which is a value of any type other than a resource.
- * @since 5.4.0
- */
- function jsonSerialize()
- {
- return array(
- "Version" => $this->_version,
- "Data" => $this->_data,
- "Message" => $this->_message
- );
- }
-
- public static function jsonDeserialize($json)
- {
- $dbo = new LuRequestDbo();
- if (isset($json["Version"])) {
- $dbo->setVersion($json["Version"]);
- }
- if (isset($json["Data"])) {
- $dbo->setData($json["Data"]);
- }
- if (isset($json["Message"])) {
- $dbo->setMessage($json["Message"]);
- }
- return $dbo;
- }
-
- private $_version;
- /**
- * @return mixed
- */
- public function getVersion()
- {
- return $this->_version;
- }
- /**
- * @param mixed $version
- */
- public function setVersion($version)
- {
- $this->_version = $version;
- }
-
- private $_data;
- /**
- * @return mixed
- */
- public function getData()
- {
- return $this->_data;
- }
- /**
- * @param mixed $data
- */
- public function setData($data)
- {
- $this->_data = $data;
- }
-
- private $_message;
- /**
- * @return mixed
- */
- public function getMessage()
- {
- return $this->_message;
- }
- /**
- * @param mixed $message
- */
- public function setMessage($message)
- {
- $this->_message = $message;
- }
-
- private $_statusCode;
-
- /**
- * @return mixed
- */
- public function getStatusCode()
- {
- return $this->_statusCode;
- }
-
- /**
- * @param mixed $statusCode
- */
- public function setStatusCode($statusCode)
- {
- $this->_statusCode = $statusCode;
- }
- }
|