From b6c6f7e5a41b934c49d0a5ac637a6083bfe4eac3 Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Mon, 15 Sep 2008 13:53:01 +0000 Subject: [PATCH] Configuration - added getOptions function, which retrieves the names of all options in a configuration file. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@873 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Configuration.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/SimpleSAML/Configuration.php b/lib/SimpleSAML/Configuration.php index e87c2e225..e631c8b4d 100644 --- a/lib/SimpleSAML/Configuration.php +++ b/lib/SimpleSAML/Configuration.php @@ -315,6 +315,24 @@ class SimpleSAML_Configuration { return $ret; } + + /** + * Retrieve list of options. + * + * This function returns the name of all options which are defined in this + * configuration file, as an array of strings. + * + * @return array Name of all options defined in this configuration file. + */ + public function getOptions() { + + if (!isset($this->configuration)) { + $this->loadConfig(); + } + + return array_keys($this->configuration); + } + } ?> \ No newline at end of file -- GitLab