Loads the specified class for an adapter.

@param string $adapter Name of the adapter.
@return string The full name of the class including namespace.
482209
private static function loadAdapterClass($adapter)
	{
		$class = ucwords($adapter) . 'Adapter';
		$fqclass = 'ActiveRecord\\' . $class;
		$source = __DIR__ . "/Adapters/$class.php";

		if (!file_exists($source))
			throw new DatabaseException("$fqclass not found!");

		require_once($source);
		return $fqclass;
	}
324757
public function getAdapter()
    {
        if ($this->repositoryAdapter instanceof AdapterInterface) {
            return $this->repositoryAdapter;
        }

        foreach ($this->adapters as $adapterClass) {
            if (class_exists($adapterClass) === false || in_array('Accompli\Chrono\Adapter\AdapterInterface', class_implements($adapterClass)) === false) {
                continue;
            }

            $adapter = new $adapterClass($this->repositoryUrl, $this->repositoryDirectory, $this->processExecutor);
            if ($adapter->supportsRepository()) {
                return $adapter;
            }
        }
    }
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;
    }
635408
public function factory( $adapter, $options = null )
    {
        $adapter = parent::factory( $adapter, $options );
        $adapter->setModel( $this->getModel() );

        if ( $adapter instanceof ServiceLocatorAwareInterface )
        {
            $adapter->setServiceLocator( $this->getServiceLocator() );
        }

        return $adapter;
    }
1249319
public function getAdapterClassName($adapterConfigName) {
		$config = StorageManager::config($adapterConfigName);

		switch ($config['adapterClass']) {
			case '\Gaufrette\Adapter\Local':
				$this->adapterClass = 'Local';

				return $this->adapterClass;
			case '\Gaufrette\Adapter\AwsS3':
				$this->adapterClass = 'AwsS3';

				return $this->adapterClass;
			case '\Gaufrette\Adapter\AmazonS3':
				$this->adapterClass = 'AwsS3';

				return $this->adapterClass;
			case '\Gaufrette\Adapter\AwsS3':
				$this->adapterClass = 'AwsS3';

				return $this->adapterClass;
			default:
				return false;
		}
	}
413941
public function getQuestionsFor(string $adapter): array
    {
        Assert::that($adapter)->choice(AdapterChoice::AVAILABLE_ADAPTERS);

        switch ($adapter) {
            case DigitalOceanAdapter::NAME:
                return [new AccessTokenQuestion()];
            case CloudFlareAdapter::NAME:
                return [
                    new EmailQuestion(),
                    new ApiKeyQuestion(),
                ];
            default:
                return [];
        }
    }
1295429
public function get($name)
    {
        if (!isset($this->adapters[$name])) {
            throw new \InvalidArgumentException(sprintf('No Adapter with name "%s" is registered.', $name));
        }

        return $this->adapters[$name];
    }
50562
protected function _factory($adapter) {
		$_this = static::getInstance();

		if (!isset($adapter['engine'])) {
			$adapter['engine'] = 'Gaufrette';
		}
		if ($adapter['engine'] === static::GAUFRETTE_ENGINE) {
			return $_this->gaufretteFactory($adapter);
		}
		if ($adapter['engine'] === static::FLYSYSTEM_ENGINE) {
			return $_this->flysystemFactory($adapter);
		}

		throw new RuntimeException();
	}
882478
private static function getClass($name, array $config)
    {
        if (!empty($config['custom_adapters_namespace'])) {
            $namespaces = (array) $config['custom_adapters_namespace'];

            foreach ($namespaces as $namespace) {
                $class = $namespace.$name;

                if (class_exists($class)) {
                    return $class;
                }
            }
        }

        return 'Embed\\Adapters\\'.$name;
    }
307292
public function setAdapters($adapters)
    {
        $this->adapterClasses = [];
        $this->adapters = [];
        foreach ($adapters as $name => $adapter) {
            $this->setAdapter($name, $adapter);
        }
    }
648659
public function setAdapter(string $adapter = null)
    {
        $this->adapter = $adapter ?? Db::getDefaultAdapterKey();
        return $this;
    }
934918
public function plugAdapter(
        $adapter,
        array $adaptees,
        ModelInterface $model = null
    ) {
        return $this->plugger
            ->setModel($model ?: $this)
            ->setAdapter($adapter)
            ->plugIn($adaptees)
            ->getConnected();
    }
503298
private function getAdapterClassFromArgument($argument)
    {
        if (!class_exists($adapterClass = $argument) &&
            !class_exists($adapterClass = '\\Sly\\NotificationPusher\\Adapter\\' . ucfirst($argument))) {
            throw new AdapterException(
                sprintf(
                    'Adapter class %s does not exist',
                    $adapterClass
                )
            );
        }

        return $adapterClass;
    }
49955
protected static function getSpecialized($properties, $adapter)
	{
		// If it's a directory, stop there
		if ($properties['type'] == 'dir')
		{
			return new Directory($properties, $adapter);
		}

		if (!isset($properties['extension']))
		{
			$bits = explode('.', $properties['path']);
			if (count($bits) > 1)
			{
				$properties['extension'] = end($bits);
			}
			else
			{
				$properties['extension'] = '';
			}
		}

		// If it's a file, do we have a more specialized class?
		$file = __DIR__ . '/Type/' . ucfirst($properties['extension']) . '.php';
		if (file_exists($file))
		{
			$class = __NAMESPACE__ . '\\Type\\' . ucfirst($properties['extension']);
			return new $class($properties, $adapter);
		}

		return new File($properties, $adapter);
	}
553612
protected function registerAdapterInstance(AdapterInterface $adapter): string
	{
		$this->adapters[$name = $adapter->getName()] = $adapter;

		return $name;
	}
498609
public function setAdapter(\Desarrolla2\Cache\Adapter\AdapterInterface $adapter)
    {
        return $this->_instance->setAdapter($adapter);
    }
1036932
protected function getAwsUrl($adapter, $path)
    {
        // If an explicit base URL has been set on the disk configuration then we will use
        // it as the base URL instead of the default path. This allows the developer to
        // have full control over the base path for this filesystem's generated URLs.
        if (! is_null($url = $this->driver->getConfig()->get('url'))) {
            return $this->concatPathToUrl($url, $adapter->getPathPrefix().$path);
        }

        return $adapter->getClient()->getObjectUrl(
            $adapter->getBucket(), $adapter->getPathPrefix().$path
        );
    }