public static function getByName($name) { try { $config = new self(); $config->setName($name); $config->getDao()->getByName(); return $config; } catch (\Exception $e) { } }
public function getgroupAction() { $id = $this->getParam("id"); $config = KeyValue\GroupConfig::getByName($id); $data = ["id" => $id, "name" => $config->getName(), "description" => $config->getDescription()]; $this->_helper->json($data); }