diff --git a/Application.php b/Application.php index 3ccc6cd..a8c7165 100644 --- a/Application.php +++ b/Application.php @@ -767,6 +767,25 @@ public function __unset(mixed $name): void unset($this->param[$name]); } + public function __get(mixed $name) + { + return $this->param[$name]; + } + + public function __isset(mixed $name): bool + { + return isset($this->data[$name]); + } + public function __set(mixed $name, mixed $value): void + { + $this->param[$name] = $value; + } + + public function __unset(mixed $name): void + { + unset($this->param[$name]); + } + public function __destruct() { $this->bootedCallbacks = []; diff --git a/Helpers/core.php b/Helpers/core.php index 5cf810d..1e6f5d3 100644 --- a/Helpers/core.php +++ b/Helpers/core.php @@ -14,12 +14,12 @@ use Qubus\Expressive\OrmBuilder; use ReflectionException; -use function file_exists; -use function in_array; -use function is_string; use function Qubus\Security\Helpers\__observer; use function Qubus\Support\Helpers\is_false__; use function Qubus\Support\Helpers\is_null__; +use function file_exists; +use function in_array; +use function is_string; use function rtrim; use function sprintf; use function substr_count; @@ -92,7 +92,7 @@ function get_fresh_bootstrap(): mixed */ function env(string $key, mixed $default = null): mixed { - return $_ENV[$key] ?? $default; + return $_ENV[$key] ?: $default; } /**