-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Similarly to what can already be done with static method calls, it should be made possible to instantiate a service by calling an instance method.
So, for the recall, a direct declaration looks like this, it will create an instance using a constructor with the provided arguments:
my_service:
class: "com.mypackage.MyClass"
constructor:
- "some_argument"
- 123
A static method declaration looks like this, it will call the someMethod
method over the MyClass
class with the provided arguments:
my_service:
class: "com.mypackage.MyClass"
method: "someMethod"
arguments:
- "some_argument"
- 123
In the same spirit, instance method declaration could look like this:
my_service:
service: "@my_other_service"
method: "someMethod"
arguments:
- "some_argument"
- 123
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request