- Issue created by @djdevin
- πΊπ¦Ukraine taraskorpach Lutsk πΊπ¦
I suppose we cannot implement a factory completely based on the container.
We could add a method called
setSource()
to theWorkspacePublisher
, in which we might set the needed Workspace to the publisher property.In the
WorkspaceOperationFactory
, we should call the new service for WorkspacePublisher like "workspaces.publisher
" and then call the methodsetSource()
from itself.Finally, the new method
getPublisher()
ofWorkspaceOperationFactory
should look like:public function getPublisher(WorkspaceInterface $source) { return $this->publisher->setSource($source); }
Please explain if we could use the DI factory pattern here or review my approach.