helper = $this->loadHelper('confmanager', null); } /** * Get all available methods with remote access. * * @return array Information about all provided methods. */ public function _getMethods() { return [ 'getConfigs' => [ 'args' => [], 'return' => 'array' ] ]; } /** * @return mixed * @throws AccessDeniedException */ public function getConfigs() { $this->ensureAdmin(); $this->helper->getConfigFiles(); return $this->getApi()->toDate(time()); } /** * @throws AccessDeniedException */ private function ensureAdmin() { if (!auth_isadmin()) { throw new AccessDeniedException(); } } }