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

suport method chaining #4

Open
PauloPhagula opened this issue Dec 8, 2016 · 0 comments
Open

suport method chaining #4

PauloPhagula opened this issue Dec 8, 2016 · 0 comments
Assignees

Comments

@PauloPhagula
Copy link
Contributor

Issue Type
  • Task
Summary

The way this is used normally involves calling many methods on the tracker one after another, so add method chaining to make it a bit more easier to use and lessen typing a bit.

So for example this

$tracker->trackTransaction($cid, $fake_payment_id, "Biscate", $subscription_cost_in_usd, 0, 0, "USD");
$tracker->trackTransactionItem($cid, $fake_payment_id, $msisdn, $subscription_cost_in_usd, 1, NULL, "worker-registration", "USD");

could be written as

$tracker
  ->trackTransaction($cid, $fake_payment_id, "Biscate", $subscription_cost_in_usd, 0, 0, "USD")
  ->trackTransactionItem($cid, $fake_payment_id, $msisdn, $subscription_cost_in_usd, 1, NULL, "worker-registration", "USD");
@PauloPhagula PauloPhagula self-assigned this Dec 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant