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.");
    }
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.");
    }
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." ) ; }
Get a shortener driver instance.

@param string|null $driver

@return Base
Get a shortener driver instance .