_adapter instanceof AbstractAdapter)) { if (!isset($this->_options['db']['adapter'])) { throw new \InvalidArgumentException("A database adapter is required for creating a Db resource."); } $this->_adapter = DbObject::factory($this->_options['db']['adapter'], $this->_options['db']); } return $this->_adapter; } }