Get channels by driver.

@param string $driver

@return Collection
335092
public function getByDriver(string $driver): Collection
    {
        return $this->channels->filter(function (array $channel) use ($driver) {
            return $channel['driver'] === $driver;
        });
    }
1142257
public function routeNotificationFor($driver)
    {
        if (\method_exists($this, $method = 'routeNotificationFor'.Str::studly($driver))) {
            return $this->{$method}();
        }

        switch ($driver) {
            case 'database':
                return $this->notifications();
            case 'mail':
                return $this->getRecipientEmail();
            case 'nexmo':
                return $this->getAttribute('phone_number');
        }
    }
373730
protected function createConfigurationAdapter($driver)
    {
        switch ($driver) {
            case self::DRIVER_MYSQL:
            case self::DRIVER_PGSQL:
            case self::DRIVER_SQLSRV:
                return new SqlAdapter();
            case self::DRIVER_SQLITE:
                return new SqliteAdapter();
            default:
                throw new Exception("Driver '{$driver}' is not supported.");
        }
    }
404064
public function driver($driver = null)
    {
        $driver = $driver ?: $this->getDefaultDriver();

        if (is_null($driver)) {
            throw new InvalidArgumentException(sprintf('Unable to resolve NULL driver for [%s].', get_called_class()));
        }

        // 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 (! isset($this->drivers[$driver])) {
            $this->drivers[$driver] = $this->createDriver($driver);
        }

        return $this->drivers[$driver];
    }
1076779
public static function driverClass($driver) {
        if ($driver instanceof PDO) {
            $name = $driver->getAttribute(PDO::ATTR_DRIVER_NAME);
        } else {
            $name = (string)$driver;
        }

        $name = strtolower($name);
        return isset(self::$drivers[$name]) ? self::$drivers[$name] : null;
    }
611454
public static function unloadDriver($driver)
    {
        foreach (array_keys(self::$drivers, $driver) as $key) {
            unset(self::$drivers[$key]);
        }
    }
1237641
public function getDriverManager(): Interfaces\JavaObject
    {
        if ($this->driverManager === null) {
            $this->driverManager = $this->ba->javaClass('java.sql.DriverManager');
        }

        return $this->driverManager;
    }
963292
public function get($driver, $default = null)
    {
        if (isset($this->drivers[$driver])) {
            return $this->drivers[$driver]->resolve();
        }

        return $default;
    }
788092
public function getView(Driver $driver)
    {
        $output = array(
            'count' => 0,
            'data' => array(),
        );

        if ($this->request->isMethod('POST')) {
            $output = $this->doBulkCreate($driver);
        }

        if (0 === count($output['data'])) {
            $message = 'message.insert_bulk_failed';
        } else {
            $message = 'message.insert_bulk';
        }

        $this->view->setParam('status', empty($output['data']) ? false : true);
        $this->view->setParam('message', $this->translator->trans($message, array(
            '%count%' => count($output['data']),
            '%deleted%' => $output['count'],
            '%data%' => implode(', ', $output['data']),
        ), $this->translationDomain));

        return $this->view;
    }
1328460
public function getChannel($key)
    {
        if (array_key_exists($key, $this->channels)) {
            return $this->channels[$key];
        }
        return null;
    }
60426
public function groups($driver = null)
	{
		$result = array();

		if ($driver === null)
		{
			foreach (\Auth::group(true) as $group)
			{
				method_exists($group, 'groups') and $result = \Arr::merge($result, $group->groups());
			}
		}
		else
		{
			$result = \Auth::group($driver)->groups();
		}

		return $result;
	}
353929
public function getChannel($channel)
    {
        $channelId = Utilities::getEntityId(
            $channel,
            'WindowsAzure\MediaServices\Models\Channel'
        );

        return Channel::createFromOptions($this->_getEntity("Channels('{$channelId}')"));
    }
862002
public function resolve($driver)
    {
        if ($driver instanceof Grid\Exporters\AbstractExporter) {
            return $driver->setGrid($this->grid);
        }

        return $this->getExporter($driver);
    }
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.");
    }
1247248
public function serverWarnings($driver = ''): Collection
    {
        $warnings = Collection::make([
            $this->databaseDriverWarnings($driver),
            $this->checkPhpExtension('curl'),
            $this->checkPhpExtension('gd'),
            $this->checkPhpExtension('simplexml'),
            $this->checkPhpIni('file_uploads', true),
            $this->checkSystemTemporaryFolder(),
            $this->checkPhpVersion(),
        ]);

        return $warnings
            ->flatten()
            ->filter();
    }
682721
public function getChannelVariables($channel = null)
    {
        if (is_null($channel)) {
            if (!isset($this->keys['channel'])) {
                return $this->getChannelVariables('default');
            } else {
                return $this->getChannelVariables($this->keys['channel']);
            }
        } else {
            $channel = strtolower($channel);
            if (!isset($this->channelVariables[$channel])) {
                return null;
            }
            return $this->channelVariables[$channel];
        }
    }
691544
protected function getConnector($driver)
    {
        if (isset($this->connectors[$driver]))
        {
            return call_user_func($this->connectors[$driver]);
        }

        throw new \InvalidArgumentException("No connector for [$driver]");
    }