diff --git a/src/DI/Definitions/ServiceDefinition.php b/src/DI/Definitions/ServiceDefinition.php index e7c8d91b8..924059bd1 100644 --- a/src/DI/Definitions/ServiceDefinition.php +++ b/src/DI/Definitions/ServiceDefinition.php @@ -62,6 +62,22 @@ public function setType(?string $type) * @return static */ public function setFactory($factory, array $args = []) + { + return $this->setCreator($factory, $args); + } + + + public function getFactory(): Statement + { + return $this->getCreator(); + } + + + /** + * @param string|array|Definition|Reference|Statement $factory + * @return static + */ + public function setCreator($factory, array $args = []) { $this->factory = $factory instanceof Statement ? $factory @@ -70,7 +86,7 @@ public function setFactory($factory, array $args = []) } - public function getFactory(): Statement + public function getCreator(): Statement { return $this->factory; }