Returns the set adapter

@return Zend_Db_Adapter
973126
public function getAdapter()
    {
        /**
         * Check for an adapter being defined. if not, fetch the default adapter.
         */
        if ($this->_adapter === null) {
            $this->_adapter = Zend_Db_Table_Abstract::getDefaultAdapter();
            if (null === $this->_adapter) {

                throw new Zend_Validate_Exception('No database adapter present');
            }
        }
        return $this->_adapter;
    }
462105
public function getEngine()
    {
        $adapter = $this->getAdapter();

        if ($adapter) {
            return $adapter;
        }
        return ucfirst($this->dsn->scheme);
    }
146013
public function getDriver()
    {
        $adapter = $this->getAdapter();

        if ($adapter) {
            return $adapter;
        }

        $engine = $this->dsn->engine;

        return 'Cake\Database\Driver\\' . ucfirst($engine);
    }
112999
public function getAdapter() {
		if ($this->_adapter === null) {
			if ($this->hasLocator()) {
				$this->_adapter = $this->getLocator()->get($this->getAdapterName());
			} else {
				throw new Exceptions\NoAdapter('Nor a database adapter neither a services locator has been provided');
			}
		}
		
		return $this->_adapter;
	}
338447
public function setDbAdapter($config)
    {
        if(is_array($config)) {
            $this->odbAdapter = new DbAdapter(array_merge(array(
                'driver' => 'Pdo_Mysql',
                'driver_options' => array(
                    PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'"
                )
            ), $config));

            $config = new \Zend\Config\Config($config, true);
            $writer = new \Zend\Config\Writer\PhpArray();
            $conf = $writer->toString($config);
        }
    }
779239
public function getLayoutAdapter()
    {
        if (null === $this->layoutAdapter) {
            $class = $this->config['layout']['adapter'];

            $this->layoutAdapter = new $class;
            $this->layoutAdapter->setEditor($this);
        }

        return $this->layoutAdapter;
    }
1249902
public function querySync(){
		$adapter = $this->_dbAdapter ?: Table::getDefaultDbAdapter();
		
		return $adapter->querySync($this->assemble(), $this->_bind, $this->_consistency, $this->_options);
	}
1093122
public function getTransport()
    {
        $adapter = $this->getAdapter();

        if ($adapter) {
            return $adapter;
        }

        return ucfirst($this->dsn->scheme);
    }
860556
public function getAdapter()
    {
        if ($this->adapter instanceof Compress\CompressionAlgorithmInterface) {
            return $this->adapter;
        }

        $adapter = $this->adapter;
        $options = $this->getAdapterOptions();
        if (!class_exists($adapter)) {
            $adapter = 'Zend\\Filter\\Compress\\' . ucfirst($adapter);
            if (!class_exists($adapter)) {
                throw new Exception\RuntimeException(sprintf(
                    '%s unable to load adapter; class "%s" not found',
                    __METHOD__,
                    $this->adapter
                ));
            }
        }

        $this->adapter = new $adapter($options);
        if (!$this->adapter instanceof Compress\CompressionAlgorithmInterface) {
            throw new Exception\InvalidArgumentException("Compression adapter '" . $adapter . "' does not implement Zend\\Filter\\Compress\\CompressionAlgorithmInterface");
        }
        return $this->adapter;
    }
95593
private function getAclAdapter() {
        $config = $this->getConfig();

        // Access control adapter
        $accessControl = $config['accessControl'];

        if (is_callable($accessControl) && !($accessControl instanceof AdapterInterface)) {
            $accessControl = $accessControl();
        }

        if (!$accessControl instanceof AdapterInterface) {
            throw new RuntimeException('Invalid access control adapter');
        }

        if (!$accessControl instanceof MutableAdapterInterface) {
            throw new RuntimeException('The configured access control adapter is not mutable');
        }

        return $accessControl;
    }
1036028
public function getAdapterInstance()
    {
        if ($this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
            return $this->adapter;
        }

        $adapter = $this->adapter;
        $options = $this->getOptions();
        if (! class_exists($adapter)) {
            $adapter = __CLASS__ . '\\' . ucfirst($adapter);
            if (! class_exists($adapter)) {
                throw new Exception\RuntimeException(sprintf(
                    '%s unable to load adapter; class "%s" not found',
                    __METHOD__,
                    $this->adapter
                ));
            }
        }

        $this->adapter = new $adapter($options);
        if (! $this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Encryption adapter "%s" does not implement %s\\EncryptionAlgorithmInterface',
                $adapter,
                __CLASS__
            ));
        }
        return $this->adapter;
    }
787938
public function setAdapter($adapter)
    {
        switch (strtolower($adapter)) {
            case 'sodium':
                $adapterSet = '\Zest\Encryption\Adapter\SodiumEncryption';
                break;
            case 'openssl':
                $adapterSet = '\Zest\Encryption\Adapter\OpenSslEncryption';
                break;
            default:
                $adapterSet = '\Zest\Encryption\Adapter\OpenSslEncryption';
                break;
        }
        $key = __config()->encryption->key;
        $this->adapter = new $adapterSet($key);

        return $this;
    }
222438
protected function getAdapter()
    {
        $type = strtolower($this->options['type']);
        if (!$this->adapter) {
            if ($this->options['class']) {
                $adapterClass = $this->options['class'];
            } else {
                $adapterClass = '\\Wslim\\Security\\Crypt\\' . ucfirst($type) . 'Adapter';
            }
            
            if (!class_exists($adapterClass)) {
                throw new Exception('crypt type is not exists: ' . $type . ' .');
            }
            $this->adapter = new $adapterClass();
        }
        return $this->adapter;
    }
1103756
public function getOptions()
    {
        if (!$this->options) {
            throw new Exception\RuntimeException(sprintf(
                'No options instance set for the adapter "%s"',
                get_class($this)
            ));
        }
        return $this->options;
    }
964532
public function getSettingsModel()
    {
        /** @var FilesystemAdapter $volumeClass */
        $volumeClass = $this->className;
        /** @var VolumeSettingsModel $model */
        $model = $volumeClass::getSettingsModel();
        $model->setVolume($this);
        if ($this->configuration) {
            $model->setAttributes($this->configuration->toArray(), false);
        }
        return $model;
    }
648160
protected function buildDatabase(): DatabaseAdapter {
		$dbName = $this->determineDbName();
		$database = new PgsqlDatabase($dbName, $this->determineDbCharset($dbName), 
				$this->getPersistedMetaEntities($dbName), $this->determineDbAttrs($dbName));
		
		foreach ($database->getMetaEntities() as $metaEntity) {
			if (!$metaEntity instanceof Table) continue;
			
			$this->metaEntityBuilder->applyIndexesForTable($dbName, $metaEntity);
		}
		
		return $database;
	}
1037353
public function setAdapter($options = null)
    {
        if (is_string($options)) {
            $adapter = $options;
        } elseif (isset($options['adapter'])) {
            $adapter = $options['adapter'];
            unset($options['adapter']);
        } else {
            $adapter = 'BlockCipher';
        }

        if (!is_array($options)) {
            $options = [];
        }

        if (class_exists('Zend\Filter\Encrypt\\' . ucfirst($adapter))) {
            $adapter = 'Zend\Filter\Encrypt\\' . ucfirst($adapter);
        } elseif (!class_exists($adapter)) {
            throw new Exception\DomainException(
                sprintf(
                    '%s expects a valid registry class name; received "%s", which did not resolve',
                    __METHOD__,
                    $adapter
                )
            );
        }

        $this->adapter = new $adapter($options);
        if (!$this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
            throw new Exception\InvalidArgumentException(
                "Encoding adapter '" . $adapter
                . "' does not implement Zend\\Filter\\Encrypt\\EncryptionAlgorithmInterface"
            );
        }

        return $this;
    }