@@ 160-166 (lines=7) @@ | ||
157 | * @return array |
|
158 | * @throws RuntimeException |
|
159 | */ |
|
160 | public function getActionMap() { |
|
161 | $actionMap = (array) Configure::read('SimpleRbac.actionMap'); |
|
162 | if (empty($actionMap) && $this->_config['allowEmptyActionMap'] === false) { |
|
163 | throw new \RuntimeException('SimpleRbac.actionMap configuration is empty!'); |
|
164 | } |
|
165 | return $actionMap; |
|
166 | } |
|
167 | ||
168 | /** |
|
169 | * Can be overriden if inherited with a method to fetch this from anywhere, a database for exaple |
|
@@ 174-180 (lines=7) @@ | ||
171 | * @return array |
|
172 | * @throws \RuntimeException |
|
173 | */ |
|
174 | public function getPrefixMap() { |
|
175 | $prefixMap = (array) Configure::read('SimpleRbac.prefixMap'); |
|
176 | if (empty($prefixMap) && $this->_config['allowEmptyPrefixMap'] === false) { |
|
177 | throw new \RuntimeException('SimpleRbac.prefixMap configuration is empty!'); |
|
178 | } |
|
179 | return $prefixMap; |
|
180 | } |
|
181 | } |
|
182 |