db = \Zend_Registry::get('db'); $this->config = \Zend_Registry::get('config'); if(isset($this->config->sub->metadata) && !empty($this->config->sub->metadata)) { $this->tbl_metadata = $this->config->sub->metadata; } } public function view($uuid) { if(\Helpers\Uuid::test($uuid) !== true) { return "参数错误"; } $sql = "SELECT * FROM ".$this->tbl_metadata." WHERE uuid='$uuid'"; $rs = $this->db->query($sql); return $rs->fetch(); } }