Skip to content

Commit fcadae6

Browse files
authoredJan 23, 2018
Implement JsonSerializable interface
Implement JsonSerializable interface into SearchReport object
1 parent 4802eed commit fcadae6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed
 

‎src/GusApi/SearchReport.php

+12-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Class SearchReport
66
* @package GusApi
77
*/
8-
class SearchReport
8+
class SearchReport implements \JsonSerializable
99
{
1010
const TYPE_JURIDICAL_PERSON = 'p';
1111

@@ -212,4 +212,14 @@ private function makeType($type)
212212
{
213213
return trim(strtolower($type));
214214
}
215-
}
215+
216+
/**
217+
* @return array
218+
*/
219+
public function jsonSerialize()
220+
{
221+
$vars = get_object_vars($this);
222+
223+
return $vars;
224+
}
225+
}

0 commit comments

Comments
 (0)
Please sign in to comment.