From de410bf75f2fee5406147cd665393443e0f80d30 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 21 Apr 2021 13:10:20 +0300 Subject: [PATCH] injectable factory change and comment --- application/Espo/Core/InjectableFactory.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/Espo/Core/InjectableFactory.php b/application/Espo/Core/InjectableFactory.php index 575604704a..416f28c578 100644 --- a/application/Espo/Core/InjectableFactory.php +++ b/application/Espo/Core/InjectableFactory.php @@ -69,14 +69,17 @@ class InjectableFactory } /** - * Create an instance by a class name. Allows passing specific constructor parameters + * Create an instance by a class name with specific constructor parameters * defined in an associative array. A key should match the parameter name. */ - public function createWith(string $className, array $with = []): object + public function createWith(string $className, array $with): object { return $this->createInternal($className, $with); } + /** + * Create an instance by a class name with a specific binding. + */ public function createWithBinding(string $className, BindingContainer $bindingContainer): object { return $this->createInternal($className, null, $bindingContainer);