Register an adapter instance with the Transcoder

@param  Adapter $adapter
@return self
345816
public function registerAdapter(Adapter $adapter)
    {
        $adapter->setTranscoder($this);
        $this->adapters[$adapter->getKey()] = $adapter;

        return $this;
    }
774590
public function authenticate( AdapterInterface $adapter = null )
    {
        $result = parent::authenticate( $adapter );

        if ( $result->isValid() )
        {
            $this->identityRefreshed = true;
        }

        return $result;
    }
1247158
def register(adapter):
    ''''''
    # register the class in the catalog
    if adapter.model and adapter.model not in adapter_catalog:
        adapter_catalog[adapter.model] = adapter
        # Automatically (re|un)index objects on save/delete
        post_save.connect(reindex_model_on_save, sender=adapter.model)
        post_delete.connect(unindex_model_on_delete, sender=adapter.model)
    return adapter
27922
public function setTransformer($transformer)
    {
        if (!(new \ReflectionClass($transformer))->implementsInterface(TransformerInterface::class)) {
            throw new InvalidTransformer();
        }

        $this->transformer = $transformer;

        return $this;
    }
765488
public function setDefaultAdapter(
        \Zend\Http\Client\Adapter\AdapterInterface $adapter
    ) {
        $this->defaultAdapter = $adapter;
    }
49292
public static function gaufretteFactory(array $adapter) {
		$class = $adapter['adapterClass'];
		$Reflection = new ReflectionClass($class);

		if (!is_array($adapter['adapterOptions'])) {
			throw new InvalidArgumentException(sprintf('%s: The adapter options must be an array!', $configName));
		}

		$adapterObject = $Reflection->newInstanceArgs($adapter['adapterOptions']);

		return new $adapter['class']($adapterObject);
	}
1078048
public function merge(self $adapterManager): self
    {
        foreach ($adapterManager->getAdapters() as $adapterTmp => $callableFunctionTmp) {
            $this->validateAdapter($adapterTmp);
            $this->validateCallable($callableFunctionTmp);

            $key = \array_search($adapterTmp, $this->adapter, true);

            if ($key) {
                $this->adapter[$key] = $adapterTmp;
                $this->callableFunctions[$key] = $callableFunctionTmp;
            } else {
                $this->adapter[] = $adapterTmp;
                $this->callableFunctions[] = $callableFunctionTmp;
            }
        }

        return $this;
    }
648659
public function setAdapter(string $adapter = null)
    {
        $this->adapter = $adapter ?? Db::getDefaultAdapterKey();
        return $this;
    }
836339
public static function getAdapter($adapter)
    {
        $config = Config::get('cache');

        if ($config && $adapter && isset($config['enabled']) && $config['enabled']) {
            if (!isset($config['pools'][$adapter])) {
                throw new ComponentException("Class `Proxy\\Cache` required configuration for `$adapter` adapter");
            }
            if (!isset(static::$pools[$adapter])) {
                static::$pools[$adapter] = $config['pools'][$adapter]();
            }
            return static::$pools[$adapter];
        }
        return false;
    }
685560
public function registerMatcher($matcher)
    {
        if (! in_array($matcher, $this->matchers) && is_a($matcher, MatcherInterface::class, true)) {
            $this->matchers[] = $matcher;
        }

        return $this;
    }
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;
    }
807356
@SuppressWarnings({"unchecked", "rawtypes"})
    public T adapter(Adapter adapter) {

        if (view instanceof AdapterView) {
            AdapterView av = (AdapterView) view;
            av.setAdapter(adapter);
        }
        return self();
    }
841064
public static function create($adapter, array $config = []): self
    {
        if (!isset(self::$adapterMap[$adapter])) {
            throw new DriverNotFoundException(sprintf(
                'Adapter "%s" not found. You should use one of: %s',
                $adapter,
                implode(', ', self::$adapterMap)
            ));
        }

        $class = self::$adapterMap[$adapter];

        return new self(new $class($config));
    }
738691
public static function config($adapter, $options = []) {
		$_this = static::getInstance();

		if (!empty($adapter) && !empty($options)) {
			return $_this->_adapterConfig[$adapter] = $options;
		}

		if (isset($_this->_adapterConfig[$adapter])) {
			return $_this->_adapterConfig[$adapter];
		}

		return false;
	}
640232
public function setAdapter(AdapterInterface $adapter)
    {
        $adapter->setClient($this);

        $this->adapter = $adapter;

        return $this;
    }
13223
protected function createAdapter(string $adapter, array $config): Adapter
    {
        if ($adapter === 'Local') {
            if (! isset($config['config']['path'])) {
                throw new RuntimeException('Filesystem local adapter must set `path`');
            }

            $config = [$config['config']['path']];
        }

        return Reflection::newInstance(
            'One\\FileSystem\\Adapters\\' . $adapter,
            $config
        );
    }
850639
public function addAdaptor(AbstractAdaptor $adaptor)
    {
        // The key will be the adaptor's name or the next numerical
        // count if a name is blank
        $adaptorName = $adaptor->getName() ?: $this->adaptorCount;
        $this->adaptors[$adaptorName] = $adaptor;
        $this->adaptorCount++;
    }