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

Factory interface + Container::make #142

Closed
mnapoli opened this issue Jan 9, 2014 · 1 comment
Closed

Factory interface + Container::make #142

mnapoli opened this issue Jan 9, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@mnapoli
Copy link
Member

@mnapoli mnapoli commented Jan 9, 2014

Having a Container::make() method would be really useful:

public function make($classname, array $parameters = []);

Any missing parameter from the array is resolved using the container.

This would probably go well with a FactoryInterace so that it can be used/injected, but while avoiding the service locator pattern (i.e. full access to all methods of the container, like get).

@ghost ghost assigned mnapoli Jan 11, 2014
mnapoli added a commit that referenced this issue Jan 11, 2014
@mnapoli
Copy link
Member Author

@mnapoli mnapoli commented Jan 11, 2014

Implemented in 4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.