| @@ 1162-1170 (lines=9) @@ | ||
| 1159 | * |
|
| 1160 | * @return bool|XoopsModule |
|
| 1161 | */ |
|
| 1162 | public function getModuleByDirname($dirname) |
|
| 1163 | { |
|
| 1164 | $key = "system/module/dirname/{$dirname}"; |
|
| 1165 | if (!$module = $this->cache()->read($key)) { |
|
| 1166 | $module = $this->getHandlerModule()->getByDirname($dirname); |
|
| 1167 | $this->cache()->write($key, $module); |
|
| 1168 | } |
|
| 1169 | return $module; |
|
| 1170 | } |
|
| 1171 | ||
| 1172 | /** |
|
| 1173 | * Get Module By Id |
|
| @@ 1179-1187 (lines=9) @@ | ||
| 1176 | * |
|
| 1177 | * @return bool|XoopsModule |
|
| 1178 | */ |
|
| 1179 | public function getModuleById($id) |
|
| 1180 | { |
|
| 1181 | $key = "system/module/id/{$id}"; |
|
| 1182 | if (!$module = $this->cache()->read($key)) { |
|
| 1183 | $module = $this->getHandlerModule()->getById($id); |
|
| 1184 | $this->cache()->write($key, $module); |
|
| 1185 | } |
|
| 1186 | return $module; |
|
| 1187 | } |
|
| 1188 | ||
| 1189 | /** |
|
| 1190 | * Render Simple Header |
|