You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally, no code instantiated by the container should need to use a reference at all.
All dependencies should be set by the container on the created instance (so, all used services, etc).
Right now there is heaps of code that does $this->container->get('xxx')->doSomething();
All of 'xxx' should be set as properties on the instance, so they can be used right away.
To avoid having to create a massive amount of setter methods on existing code it might be an idea to add a generic setServices([array of service ids]) method to ZMObject (initially) and leave it to that method to depend on the container property and populate all configured services Reporter: Martin Rademacher Assigned to: Martin Rademacher Begin: 2012-06-24 Completed: 0
The text was updated successfully, but these errors were encountered:
Ideally, no code instantiated by the container should need to use a reference at all.
All dependencies should be set by the container on the created instance (so, all used services, etc).
Right now there is heaps of code that does $this->container->get('xxx')->doSomething();
All of 'xxx' should be set as properties on the instance, so they can be used right away.
To avoid having to create a massive amount of setter methods on existing code it might be an idea to add a generic setServices([array of service ids]) method to ZMObject (initially) and leave it to that method to depend on the container property and populate all configured services
Reporter: Martin Rademacher
Assigned to: Martin Rademacher
Begin: 2012-06-24
Completed: 0
The text was updated successfully, but these errors were encountered: