/** * 设置数据库访问对象 * * @param QDB_Adapter_Abstract $conn */ function setConn(QDB_Adapter_Abstract $conn) { $this->_conn = $conn; if (!$this->_conn->isConnected()) { $this->_conn->connect(); } if (empty($this->schema)) { $this->schema = $conn->getSchema(); } if (empty($this->prefix)) { $this->prefix = $conn->getTablePrefix(); } }