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

Create method #14

Closed
jeremy-hunter opened this issue Feb 24, 2017 · 6 comments
Closed

Create method #14

jeremy-hunter opened this issue Feb 24, 2017 · 6 comments
Assignees
Milestone

Comments

@jeremy-hunter
Copy link

No description provided.

@gabrielbull
Copy link
Collaborator

Can you explain your issue?

@jeremy-hunter
Copy link
Author

Whoops

Anyways...

Would you be opposed to a static create() method that took the service name and created the object for you? (Like omnipay) Just trying to avoid including a bunch of classes that are actually not needed just to use a switch to figure out which one I need for this particular instance.

@gabrielbull
Copy link
Collaborator

Something like this?

Omnimail::create(Omnimail::SendGrid, $apiKey);

@eileenmcnaughton
Copy link
Collaborator

I think you would need to pass an array or interface rather than a single variable as it might vary

@gabrielbull
Copy link
Collaborator

So like this:

Omnimail::create(Omnimail::SendGrid, [
    'apiKey' => $apiKey
]);

Anyone got time for this? Should be a simple implementation.

@gabrielbull
Copy link
Collaborator

Merged into develop branch.

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

3 participants