globalParamDao = $globalParamDao; } public function getMethods() { return ['GET']; } public function getUrl() { return '/api/globals'; } public function work($args) { $globals = $this->globalParamDao->findAll(); $result = []; foreach ($globals as $global) { $result[$global->getKey()] = $global->getValue(); } return $result; } }