BeatSwitch\Lock\Integrations\Laravel\LockServiceProvider::getDriver PHP Метод

getDriver() защищенный Метод

Returns the configured driver
protected getDriver ( ) : BeatSwitch\Lock\Drivers\Driver
Результат BeatSwitch\Lock\Drivers\Driver
    protected function getDriver()
    {
        // Get the configuration options for Lock.
        $driver = $this->app['config']->get('lock.driver');
        // If the user choose the persistent database driver, bootstrap
        // the database driver with the default database connection.
        if ($driver === 'database') {
            $table = $this->app['config']->get('lock.table');
            return new DatabaseDriver($this->app['db']->connection(), $table);
        }
        // Otherwise bootstrap the static array driver.
        return new ArrayDriver();
    }