Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

At service-manager to handle commands / all objects? #15

Closed
RalfEggert opened this issue Nov 22, 2014 · 2 comments
Closed

At service-manager to handle commands / all objects? #15

RalfEggert opened this issue Nov 22, 2014 · 2 comments

Comments

@RalfEggert
Copy link
Contributor

I thought of adding the ZF2 ServiceManager to handle the commands. I think it would make it much easier to create factories to create command instances. Or we could even add all objects to the ServiceManager, especially the Application instance. That would make it much easier to inject the Application instance to the HelpCommand as well. We could even refactor the Application class and pull out the standard commands to external classes (like the HelpCommand). An extra interface could standardize the __invoke() methods for all commands.

Would the effort be worth it or would it introduce an unwanted complexity or overhead?

@ArnaudLigny
Copy link
Contributor

I love the idea! 👍

@vaclavvanik
Copy link

Totally agree. Commands without possibility of injecting services into constructor are half-handed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants