public function getDriver($driver = null)
    {
        $driver = ($driver) ?: array_get($this->config, 'driver', '');

        $method = 'create'.ucfirst(camel_case($driver)).'Driver';

        if (! method_exists($this, $method)) {
            throw new InvalidDriverException(sprintf('Driver [%s] not supported.', $driver));
        }

        return $this->{$method}(array_get($this->config, $driver, []));
    }
public function getDriver($driver = null)
    {
        $driver = ($driver) ?: array_get($this->config, 'driver', '');

        $method = 'create'.ucfirst(camel_case($driver)).'Driver';

        if (! method_exists($this, $method)) {
            throw new InvalidDriverException(sprintf('Driver [%s] not supported.', $driver));
        }

        return $this->{$method}(array_get($this->config, $driver, []));
    }
public function getDriver ( $ driver = null ) { $ driver = ( $ driver ) ? : array_get ( $ this -> config , 'driver' , '' ) ; $ method = 'create' . ucfirst ( camel_case ( $ driver ) ) . 'Driver' ; if ( ! method_exists ( $ this , $ method ) ) { throw new InvalidDriverException ( sprintf ( 'Driver [%s] not supported.' , $ driver ) ) ; } return $ this -> { $ method } ( array_get ( $ this -> config , $ driver , [ ] ) ) ; }
Get the driver based on config.

@return \PulkitJalan\GeoIP\AbstractGeoIPDriver
Get the driver based on config .