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

Comments

Projects
None yet
1 participant
@mnapoli
Member

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

This comment has been minimized.

Show comment
Hide comment
@mnapoli

mnapoli Jan 11, 2014

Member

Implemented in 4.0

Member

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