response->docs);
?>
Outputs the following:
Array
(
[0] => Object
(
You should look at get_object_vars , as your properties are declared private you should call this inside the class and return its results.
Be careful, for primitive data types like strings it will work great, but I don't know how it behaves with nested objects.
in your case you have to do something like;
response->docs));
?>