1 | <?php |
||
19 | class Settings extends \Singleton |
||
20 | { |
||
21 | /** |
||
22 | * Load the settings file |
||
23 | * |
||
24 | * @see \Singleton::getInstance() |
||
25 | */ |
||
26 | protected function __construct() |
||
39 | |||
40 | /** |
||
41 | * Instantiate all classes pointed to by the specified property name and return |
||
42 | * |
||
43 | * @param string $propName The property name in the settings file |
||
44 | * |
||
45 | * @return array An array of classes or empty array if not set |
||
46 | */ |
||
47 | public function getClassesByPropName($propName) |
||
63 | |||
64 | /** |
||
65 | * Get the \Data\DataSet parameters by name |
||
66 | * |
||
67 | * @param string $dataSetName The name of the dataset |
||
68 | * |
||
69 | * @return array|false An array of properties or false if no such dataset |
||
70 | */ |
||
71 | public function getDataSetData($dataSetName) |
||
79 | |||
80 | /** |
||
81 | * Get the property from the settings file |
||
82 | * |
||
83 | * @param string $propName The name of the property in the settings file |
||
84 | * @param mixed $default The default value to return if not set |
||
85 | * |
||
86 | * @return mixed The value from the settings file or the value of $default it not set |
||
87 | */ |
||
88 | public function getGlobalSetting($propName, $default = false) |
||
96 | |||
97 | /** |
||
98 | * Get the site links for the left hand side of the header |
||
99 | * |
||
100 | * @return array The array of links or an empty array if not set |
||
101 | */ |
||
102 | public function getSiteLinks() |
||
110 | |||
111 | /** |
||
112 | * Get the ldap connection string specified in the settings file |
||
113 | * |
||
114 | * @param mixed $default The default value to return if not set |
||
115 | * |
||
116 | * @return mixed The LDAP connection string or $default if not set |
||
117 | */ |
||
118 | private function getLDAPHost($default) |
||
130 | |||
131 | /** |
||
132 | * Get the specified ldap setting from the settings file |
||
133 | * |
||
134 | * @param string $propName The property name to retrieve |
||
135 | * @param boolean $ldapAuth Is the value authentication or other |
||
136 | * @param mixed $default The default value to return if not set |
||
137 | * |
||
138 | * @return mixed The value from the settings file |
||
139 | */ |
||
140 | public function getLDAPSetting($propName, $ldapAuth = false, $default = false) |
||
162 | } |
||
163 |