public static function make($name, $parameters, $httpClient = null)
    {
        if (!$name) {
            throw new MissingConfigurationException('The config file is missing the (Default Driver Name)');
        }

        // prepare the full driver class name
        $driver_class = self::DRIVERS_NAMESPACE.ucwords($name);

        if (!class_exists($driver_class)) {
            throw new UnsupportedDriverException("The driver ($name) is not supported.");
        }

        // initialize the driver object and pass the parameters to it's constructor
        $driver_object = new $driver_class($parameters, $httpClient);

        return $driver_object;
    }
public static function make($name, $parameters, $httpClient = null)
    {
        if (!$name) {
            throw new MissingConfigurationException('The config file is missing the (Default Driver Name)');
        }

        // prepare the full driver class name
        $driver_class = self::DRIVERS_NAMESPACE.ucwords($name);

        if (!class_exists($driver_class)) {
            throw new UnsupportedDriverException("The driver ($name) is not supported.");
        }

        // initialize the driver object and pass the parameters to it's constructor
        $driver_object = new $driver_class($parameters, $httpClient);

        return $driver_object;
    }
public static function make ( $ name , $ parameters , $ httpClient = null ) { if ( ! $ name ) { throw new MissingConfigurationException ( 'The config file is missing the (Default Driver Name)' ) ; } // prepare the full driver class name $ driver_class = self :: DRIVERS_NAMESPACE . ucwords ( $ name ) ; if ( ! class_exists ( $ driver_class ) ) { throw new UnsupportedDriverException ( "The driver ($name) is not supported." ) ; } // initialize the driver object and pass the parameters to it's constructor $ driver_object = new $ driver_class ( $ parameters , $ httpClient ) ; return $ driver_object ; }
initialize the driver instance and return it.

@param $name       driver name to be initialized
@param $parameters parameters to be passed to the driver constructor
@param $httpClient

@return \Vinelab\UrlShortener\Drivers\Vinelab\UrlShortener\Contracts\DriverInterface
initialize the driver instance and return it .