From 491099d963d184f5c7c845d8cf75df56893207fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 13 Aug 2021 16:57:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Annotation/Inject.php | 11 ++++++----- System/Di/Container.php | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Annotation/Inject.php b/Annotation/Inject.php index 03895889..8dc67284 100644 --- a/Annotation/Inject.php +++ b/Annotation/Inject.php @@ -6,10 +6,11 @@ namespace Annotation; use Exception; use HttpServer\Http\Context; -use ReflectionException; -use ReflectionProperty; use Kiri\Core\Str; use Kiri\Kiri; +use ReflectionException; +use ReflectionProperty; +use Server\ResponseInterface; /** * Class Inject @@ -46,9 +47,6 @@ use Kiri\Kiri; if ($method->isPrivate() || $method->isProtected()) { $this->setter($class, $method, $injectValue); } else { - if (is_string($injectValue)){ - var_dump($injectValue); - } $class->{$method->getName()} = $injectValue; } return true; @@ -99,6 +97,9 @@ use Kiri\Kiri; if (Context::hasContext($this->value)) { return Context::getContext($this->value); } + if ($this->value == ResponseInterface::class) { + var_dump($this->value); + } if (class_exists($this->value)) { return Kiri::getDi()->get($this->value, $this->args); } else if (Kiri::app()->has($this->value)) { diff --git a/System/Di/Container.php b/System/Di/Container.php index 35d24328..4ceb78d2 100644 --- a/System/Di/Container.php +++ b/System/Di/Container.php @@ -86,7 +86,6 @@ class Container extends BaseObject { if ($this->_isInterface($class)) { $class = $this->_interfaces[$class]; - var_dump($class); } if (!isset($this->_singletons[$class])) { $this->_singletons[$class] = $this->resolve($class, $constrict, $config);