Set a default HTTP adapter (primarily for testing purposes).

@param \Zend\Http\Client\Adapter\AdapterInterface $adapter Adapter

@return void
765488
public function setDefaultAdapter(
        \Zend\Http\Client\Adapter\AdapterInterface $adapter
    ) {
        $this->defaultAdapter = $adapter;
    }
1354772
public void setAdapter(PagerAdapter adapter) {
    if (mAdapter != null) {
      mAdapter.unregisterDataSetObserver(mObserver);
      mAdapter.startUpdate(this);
      mAdapter.destroyItem(this, mCurrentPosition, mCurrentFragment);
      mAdapter.finishUpdate(this);
      mCurrentPosition = 0;
    }

    mAdapter = adapter;
    mExpectedAdapterCount = 0;

    if (mAdapter != null) {
      if (mObserver == null) {
        mObserver = new PagerObserver();
      }
      mAdapter.registerDataSetObserver(mObserver);
      mPopulatePending = false;
      final boolean wasFirstLayout = mFirstLayout;
      mFirstLayout = true;
      mExpectedAdapterCount = mAdapter.getCount();
      if (mRestoredCurItem >= 0) {
        mAdapter.restoreState(mRestoredAdapterState, mRestoredClassLoader);
        setCurrentItemInternal(mRestoredCurItem, true);
        mRestoredCurItem = -1;
        mRestoredAdapterState = null;
        mRestoredClassLoader = null;
      } else if (!wasFirstLayout) {
        populate();
      } else {
        requestLayout();
      }
    }
  }
792656
public function setLoaders($loaders)
    {
        if ($loaders instanceof LoaderInterface) {
            $loaders = [$loaders];
        }

        foreach ($loaders as $name => $loader) {
            $this->setLoader($name, $loader);
        }
    }
17070
public function setLoader($loader)
    {
        if (!is_array($loader) && !($loader instanceof LoaderInterface)) {
            throw new InvalidParamException('Argument should be an array or implement LoaderInterface');
        }

        $this->loader = $loader;
    }
34326
protected function getAdapter() : AdapterInterface
    {
        if ($this->adapter === null) {
            $databaseFile = $this->getTemporaryFileName();
            $adapter = AdapterFactory::getInstance($databaseFile);
            $this->setAdapter($adapter);
        }

        return $this->adapter;
    }
1264134
public function addAdapter($name, CacheItemPoolInterface $adapter, $default = false)
    {
        if (false === is_string($name)) {
            throw CacheException::adapterNameNotString($name);
        }

        if (true === array_key_exists($name, $this->adapters)) {
            throw CacheException::adapterAlreadyExists($name);
        }

        $this->adapters[$name] = $adapter;

        if (true === $default) {
            $this->setDefaultAdapterName($name);
        }
    }
1091293
public function setAdapter( tao_helpers_grid_Cell_Adapter $adapter)
    {
        $returnValue = (bool) false;

        
		if(!is_null($adapter)){
			$this->adapters[] = $adapter;
			$returnValue = true;
		}
        

        return (bool) $returnValue;
    }
1244011
public function setAdapter($adapter)
    {
        if (is_string($adapter)) {
            if (class_exists($adapter)) {
                $class = $adapter;
            } elseif (class_exists("PSchwisow\\Phergie\\Plugin\\UrlShorten\\Adapter\\{$adapter}")) {
                $class = "PSchwisow\\Phergie\\Plugin\\UrlShorten\\Adapter\\{$adapter}";
            } else {
                throw new \InvalidArgumentException("Class not found: '$adapter'");
            }
            $adapter = new $class;
        }

        if (!$adapter instanceof AbstractAdapter) {
            throw new \InvalidArgumentException(
                'Shortener service must extend PSchwisow\Phergie\Plugin\UrlShorten\Adapter\AbstractAdapter'
            );
        }
        $this->adapter = $adapter;

    }
648659
public function setAdapter(string $adapter = null)
    {
        $this->adapter = $adapter ?? Db::getDefaultAdapterKey();
        return $this;
    }
174033
public function setAdapter($name, AdapterInterface $adapter)
    {
        $this->adapters[$name] = $adapter;
        $this->adapterClasses[$name] = get_class($adapter);
    }
830338
public function setEventDispatcher(EventDispatcherInterface $eventDispatcher)
	{
		$this->eventDispatcher = $eventDispatcher;
		$this->twig->setEventDispatcher($eventDispatcher);
	}
345816
public function registerAdapter(Adapter $adapter)
    {
        $adapter->setTranscoder($this);
        $this->adapters[$adapter->getKey()] = $adapter;

        return $this;
    }
1169607
public void setAdapter(final BaseCircularViewAdapter adapter) {
        mAdapter = adapter;
        if (mAdapter != null) {
            mAdapter.registerDataSetObserver(mAdapterDataSetObserver);
        }
        postInvalidate();
    }
781965
public function setAdaptor($adaptor = null)
    {

        // Set the adaptor
        $this->adaptor = $adaptor;

        // If we just want to reset the adaptor
        if ( ! $adaptor ) {
            return $this;
        }

        // Validate the adaptor
        if ( ! ( $adaptor instanceof CropAdaptorInterface ) ) {
            throw new \Exception( 'The adaptor need to implement LasseHaslev\Image\Adaptors\CropAdaptorInterface' );
        }

        // Return this for binding
        return $this;
    }
1252816
public function setAdapterClass($name, $adapterClass)
    {
        $this->adapterClasses[$name] = $adapterClass;
        unset($this->adapters[$name]);
    }
1092737
protected function _setRenderer($renderer)
    {
        if ($renderer !== null && !($renderer instanceof RendererInterface)) {
            throw $this->_createInvalidArgumentException(
                $this->__('Invalid renderer'),
                null,
                null,
                $renderer
            );
        }

        $this->renderer = $renderer;
    }
104018
public function prepareAndInitializeAdapter(IDatabaseConnectionSettings $connectionSettings, $adapterName)
    {
        if (!$adapterName) {
            throw new \InvalidArgumentException('The AdapterName was not specified, this field is not Optional in the MySQL Connection');
        }

        switch ($adapterName) {
            case self::CONNECTION_PDO:
                $this
                    ->setDbAdapter(new PDOConnectionAdapter($connectionSettings))
                    ->checkForConnectionStatus();
            break;
            case self::CONNECTION_MYSQLI:
                $this
                    ->setDbAdapter(new MySQLiConnectionAdapter($connectionSettings))
                    ->checkForConnectionStatus();

                break;
            case self::CONNECTION_MOCK:
                $this
                    ->setDbAdapter(new MockMysqlConnectionAdapter($connectionSettings))
                    ->checkForConnectionStatus();

                break;
            default:
                throw new \InvalidArgumentException('The AdapterName was wrong only pdo and mysqli are allowed');
        }
    }