-
Notifications
You must be signed in to change notification settings - Fork 2
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
ApiResponse interface #11
Comments
It does for the Deserializers.https://github.com/api-php/boilerplate/blob/master/src/Deserializer/ModelDeserializer.php#L39 |
Ah, missed that. Well, it looks a bit strange from a domain point of view. Wonder if we could get around this with duck typing. In any case: call it Model? |
Yes, Rename the namespace What do you mean with "duck typing"? |
Duck typing: check if there is a create method and it accepts an array instead of checking with an interface. Less elegant, but does not interfere with the domain. But it doesn't really matter after all. Any reason why it should be Model\Api instead of just Model? |
Using duck typing is not type safe. We do not have the contract that is provided with the interface that makes sure that the
What if we have other models in our client? But hm... what other models should that be? No, no real reason. |
What's the rationale behind? IMO the ApiClient/Resource knows the Model to use, doesn't it? In that case an extra interface does not really add anything, does it?
The text was updated successfully, but these errors were encountered: