From 746399fbf0f7728649da16e26cf478efcaeae3a3 Mon Sep 17 00:00:00 2001 From: gzhegow <6562680@gmail.com> Date: Tue, 28 May 2024 02:04:21 +0300 Subject: [PATCH] main --- src/Di.php | 9 +++++++++ src/DiInterface.php | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/Di.php b/src/Di.php index 5fff96f..db1630b 100644 --- a/src/Di.php +++ b/src/Di.php @@ -55,6 +55,13 @@ public function setSettings(array $settings = null) // : static } + public function resetCache() // : static + { + $this->reflector->resetCache(); + + return $this; + } + /** * @param array{ * reflectorCacheMode: string|null, @@ -80,6 +87,8 @@ public function setCacheSettings(array $settings = null) // : static $cacheFilename ); + $this->reflector->resetCache(); + return $this; } diff --git a/src/DiInterface.php b/src/DiInterface.php index 186d784..356787f 100644 --- a/src/DiInterface.php +++ b/src/DiInterface.php @@ -17,6 +17,9 @@ interface DiInterface */ public function setSettings(array $settings = null); // : static + + public function resetCache(); // : static + /** * @param array{ * reflectorCacheMode: string|null,