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

Better shorthand methods #51

Closed
g105b opened this issue Aug 18, 2017 · 0 comments
Closed

Better shorthand methods #51

g105b opened this issue Aug 18, 2017 · 0 comments
Assignees

Comments

@g105b
Copy link
Member

g105b commented Aug 18, 2017

Using magic methods breaks a lot of IDEs and is not great API design. The get* getAll* insert* ideas from #20 are being dropped in favour of this simplified API:

$customer = $db->fetch("customer/getById", 123);
echo "Customer name is " . $customer->first_name;

$numberDeleted = $db->delete("customer/deleteOldCustomers", ["created_at" => new DateTime("-2 years")]);
echo "Deleted $numberDeleted customers!";
@g105b g105b added this to the v1 milestone Aug 18, 2017
@g105b g105b self-assigned this Aug 18, 2017
@g105b g105b mentioned this issue Aug 25, 2017
@g105b g105b closed this as completed in 7184b80 Aug 25, 2017
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

1 participant