From 8285f1df43ce19bbd533c70c3fd1487908883725 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Mon, 1 Feb 2021 18:03:09 -0500 Subject: Add comprehensive user configuration in extensions (#3397) Before, the extension configuration was handled by its author. There was discrepancies between extensions on how the configuration was stored. Now, we could rely on a single way of storing configuration. This won't invalidate how the extensions are storing their configuration but will allow authors to focus on what is important. --- lib/Minz/Configuration.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/Minz/Configuration.php') diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php index 3cf356a2b..7c60c7567 100644 --- a/lib/Minz/Configuration.php +++ b/lib/Minz/Configuration.php @@ -140,6 +140,15 @@ class Minz_Configuration { return $this->configuration_setter; } + /** + * Check if a parameter is defined in the configuration + * + * @return bool + */ + public function hasParam(string $key) { + return isset($this->data[$key]); + } + /** * Return the value of the given param. * -- cgit v1.2.3