Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote API client resource deserialisation #170

Closed
Robindfuller opened this issue Apr 26, 2018 · 2 comments
Closed

Remote API client resource deserialisation #170

Robindfuller opened this issue Apr 26, 2018 · 2 comments
Milestone

Comments

@Robindfuller
Copy link

How do I deserialise the response from

$client->read('posts', '1')->getDocument()->getResource();

...in to a Plain Old PHP Object including included relationships?

Same with

$client->index('posts');

I have my Entity classes and Hydrators for my entities but no idea how to implement it. Without the ability to deserialise, I might just as well use json_decode() on my guzzle client response.

@lindyhopchris
Copy link
Member

Hi! There isn't support for the clients for deserializing. It is something we will add in the future as it will be possible to do, but at the moment the package is focused on being a server rather than a client.

I'll leave this issue open as a reminder that it needs to be added in.

@lindyhopchris lindyhopchris added this to the 1.1.0 milestone May 3, 2018
@lindyhopchris
Copy link
Member

Closing this because as per #388 there is a JSON API client package out there that looks good. Our package will just focus on doing the server rather than client side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants