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

Use interfaces instead of concrete classes for the item model #139

Open
izziaraffaele opened this issue Jul 1, 2016 · 3 comments
Open

Comments

@izziaraffaele
Copy link

Would be nice to use model classes which implement a BuyableInterface instead of relying on concrete classes and mapped attributes.

interface BuyableInterface {
  function getBuyableId();
  function getBuyableName();
  ....
}

A BuyableRepository which implements a BuyableRepositoryInterface will be used to retrive items from any kind of storage system.

interface BuyableRepositoryInterface {
  function findByBuyableId();
  ....
}
@lukepolo
Copy link
Owner

lukepolo commented Jul 1, 2016

Agree 100%. Ill try to get to it this weekend. Also 2.0 is around the corner hoping soon but cant say a timeline for sure.

@izziaraffaele
Copy link
Author

I can help if you want, maybe I can do it even today if we can define interfaces' methods.

@lukepolo
Copy link
Owner

lukepolo commented Jul 1, 2016

That would be awesome! Im more than happy to accept a PR.

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