From 200b58bdf5161e592addfb5a2fda935f54570e0d Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Tue, 7 May 2024 12:28:15 +0000 Subject: [PATCH] - WIP on supporting multiple contexts, better handling of caching for methods / functions (instead of in every files, etc... --- src/Compiler/BaseContext.php | 2 +- src/Compiler/Context.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Compiler/BaseContext.php b/src/Compiler/BaseContext.php index 2a657d9..a3d27da 100644 --- a/src/Compiler/BaseContext.php +++ b/src/Compiler/BaseContext.php @@ -4,7 +4,7 @@ namespace Picea\Compiler; class BaseContext extends Context { - public function __construct(?string $defaultNamespace = null) { + public function __construct(array|string|null $defaultNamespace = null) { if ( $defaultNamespace !== null ) { $this->namespace = $defaultNamespace; } diff --git a/src/Compiler/Context.php b/src/Compiler/Context.php index 51c6170..fe6645b 100644 --- a/src/Compiler/Context.php +++ b/src/Compiler/Context.php @@ -6,7 +6,7 @@ use Picea\Compiler; abstract class Context { - public string $namespace = ""; + public string|array $namespace = ""; public string $extendFrom = "";