From 78d2d5e4caf9a8ee55e73d2db328c47baad3d22a Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Tue, 12 May 2015 12:09:21 +0000 Subject: [PATCH] config : getAll function : return all the defined parameters git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2168 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- config.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config.php b/config.php index 5dd5eb8..142a72a 100644 --- a/config.php +++ b/config.php @@ -48,6 +48,16 @@ class config return $this->default; } + /** Return the defined values */ + public function getAll () + { + $conf = array (); + $rc = include ($this->confFile); + if ($rc !== 1) + throw new Exception ("Error in configuration file"); + return $conf; + } + /** Get the value of the provided parameter recorded in .php file If it is not set in .php file, use the default value @param string $param The option name to be returned */