Reading through the code, I found something that concerns me. I wanted to have the class name for the service to be dependent on one of the container values. However, currently it doesn't seem possible.
I want to allow easy substitution of service implementation by storing the class name in the container. To achieve this, I wanted to wrap the class name given to my implementation of ObjectDefinitionInterface into an implementation of ParameterDefinitionInterface. However, looks like this probably won't work, since you create a reflection from a raw string value without ever attempting to resolve it.
Reading through the code, I found something that concerns me. I wanted to have the class name for the service to be dependent on one of the container values. However, currently it doesn't seem possible.
I want to allow easy substitution of service implementation by storing the class name in the container. To achieve this, I wanted to wrap the class name given to my implementation of
ObjectDefinitionInterface
into an implementation ofParameterDefinitionInterface
. However, looks like this probably won't work, since you create a reflection from a raw string value without ever attempting to resolve it.Looks like this could easily be made possible by calling
DefinitionResolver#resolveSubDefinition()
on the value returned byObjectDefinitionInterface#getClassName()
first.