From ee234d2f50915225baf859d0b166c0821b7a883d Mon Sep 17 00:00:00 2001 From: Timo Date: Mon, 30 Apr 2018 14:22:21 +0200 Subject: [PATCH] serialising fix models --- src/Wuunder/Connector.php | 1 - src/Wuunder/Model/Model.php | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Wuunder/Connector.php b/src/Wuunder/Connector.php index c96a25a..143a56f 100644 --- a/src/Wuunder/Connector.php +++ b/src/Wuunder/Connector.php @@ -16,7 +16,6 @@ class Connector private $apiKey; private $apiEnvironment; - private $logger; public function __construct($apiKey, $isStaging = true) { diff --git a/src/Wuunder/Model/Model.php b/src/Wuunder/Model/Model.php index 2cb764b..2f5bcec 100644 --- a/src/Wuunder/Model/Model.php +++ b/src/Wuunder/Model/Model.php @@ -4,7 +4,7 @@ use Wuunder\Util\Helper; -class Model +class Model implements JsonSerializable { private $keys; protected $data; @@ -105,4 +105,8 @@ private function _underscore($name) self::$_underscoreCache[$name] = $result; return $result; } + + public function jsonSerialize() { + return $this->data; + } } \ No newline at end of file