@param Driver $driver

@return View
511724
public function getView(Driver $driver)
    {
        $this->view->setParam('errors', false);
        $this->view->setParam('message', 'ok');

        if (false === $this->crudOperationHandler->remove($driver, $this->model)) {
            $this->view->setParam('errors', true);
            $this->view->setParam('message', $this->translator->trans($this->crudOperationHandler->getErrorMessage(), array(), $this->translationDomain));
        }

        return $this->view;
    }
1221955
protected function createDriver($driver)
    {
        $config = config("payments.{$driver}", null);
        if (is_string($config)) {
            return $this->createDriver($config);
        }
        if ($config === null) {
            throw new InvalidArgumentException("Driver [$driver] not supported.");
        }
        $provider = $config['provider'] ?? null;

        // We'll check to see if a creator method exists for the given driver. If not we
        // will check for a custom driver creator, which allows developers to create
        // drivers using their own customized driver creator Closure to create it.
        if (isset($this->customCreators[$provider])) {
            $config['shop'] = $driver;
            return tap(
                $this->callCustomCreator($provider, $config),
                function (PaymentProviderInterface $provider) use ($driver) {
                    $provider->setLogger(
                        new Logger($driver, [new RotatingFileHandler(storage_path("logs/{$driver}.log"))])
                    );
                }
            );
        }
        throw new InvalidArgumentException("Provider [$provider] not supported.");
    }
915890
public function getView($view)
    {
        if (Template::exists('Form/' . $view)) {
            return Template::getAdminTemplate('Form/' . $view);
        }

        return new View($view, B8_PATH . 'Form/View/');
    }
933307
protected function createDriver($driver)
    {
        try {
            return parent::createDriver($driver);
        } catch (Exception $e) {
            if ($newDriver = $this->nextDriver($driver)) {
                return $this->createDriver($newDriver);
            }
            throw $e;
        }
    }
759486
public function actionView(string $id)
    {
        $model = $this->findModel($id);

        return $this->render('view', ['model' => $model]);
    }
777054
protected function createDriver($driver)
    {
        if (isset($this->initialDrivers[$driver])) {
            $provider = $this->initialDrivers[$driver];
            $provider = __NAMESPACE__.'\\Providers\\'.$provider.'Provider';

            return $this->buildProvider($provider, $this->formatConfig($this->config->get($driver)));
        }

        if (isset($this->customCreators[$driver])) {
            return $this->callCustomCreator($driver);
        }

        throw new InvalidArgumentException("Driver [$driver] not supported.");
    }
486701
public function setDriver( IDriver $driver ) : Connection
   {

      $this->_driver = $driver;
      $this->_pdo    = null;

      return $this;

   }
932404
protected function createDriver($driver)
    {
        if (isset($this->customCreators[ $driver ])) {
            return $this->callCustomCreator($driver);
        }

        return $this->buildCustomProvider($driver);
    }
1265515
public static function getConnection($driver)
    {
        $driver = strtolower($driver);

        if (empty(static::$connections[$driver])) {
            return null;
        }

        return static::$connections[$driver];
    }
1268714
public function getAdapter(string $driver, string $connection = null)
    {
        if (array_key_exists($driver, $this->drivers)) {
            return $this->drivers[$driver]->getAdapter($connection);
        }
    }
511366
public function driver( $driver = null )
	{
		$driver = strtolower( $driver ?: $this->getDefaultDriver() );

		// If the given driver has not been created before, we will create the instances
		// here and cache it so we can return it next time very quickly. If there is
		// already a driver created by this name, we'll just return that instance.
		if ( !array_key_exists( $driver, $this->drivers ) )
			$this->drivers[$driver] = $this->createDriver( $driver );

		return $this->drivers[$driver];
	}
335092
public function getByDriver(string $driver): Collection
    {
        return $this->channels->filter(function (array $channel) use ($driver) {
            return $channel['driver'] === $driver;
        });
    }
277545
public function setDriver(string $driver = null)
    {
        if ($driver) {
            $this->driver = \strtolower($driver);
        }
        $this->instance = null;

        return $this;
    }
1327960
public function setDriver(\BearFramework\App\ICacheDriver $driver): self
    {
        if ($this->driver !== null) {
            throw new \Exception('A cache driver is already set!');
        }
        $this->driver = $driver;
        return $this;
    }
698077
protected function createDriver($driver)
    {
        // We'll check to see if a creator method exists for the given driver. If not we
        // will check for a custom driver creator, which allows developers to create
        // drivers using their own customized driver creator Closure to create it.
        if (isset($this->customCreators[$driver])) {
            return $this->callCustomCreator($driver);
        } else {
            $method = 'create' . Str::studly($driver) . 'Driver';

            if (method_exists($this, $method)) {
                return $this->$method();
            }
        }
        throw new InvalidArgumentException("Driver [$driver] not supported.");
    }
811309
public function driver($driver = null)
    {
        $shortener = $this->app['config']['shortener'];

        $driver = $driver ?: $shortener['default'];

        $driverMethod = 'create'.ucfirst($driver).'Driver';

        if (method_exists($this, $driverMethod)) {
            return $this->{$driverMethod}($shortener);
        }

        throw new InvalidArgumentException("Driver [{$driver}] is not supported.");
    }
878757
public function find(Driver $driver, $modelClass, $id)
    {
        $this->managerFactory->setModelClass($modelClass);

        return $this->managerFactory->getManager($driver)->find($id);
    }