public function getDriver()
    {
        // Attempt to retrieve the driver config
        $config = new Config($this->configDirectory);
        $driverClass = $config->getDriver();
        // Validate Driver Class
        $reflection = new ReflectionClass($driverClass);
        // Ensure class is built with the correct interface
        if (false === $reflection->implementsInterface('Signalert\Storage\DriverInterface')) {
            throw new SignalertResolverException;
        }
        // If it all checks out, resolve the class and instantiate
        return $reflection->newInstance();

    }
public function getDriver()
    {
        // Attempt to retrieve the driver config
        $config = new Config($this->configDirectory);
        $driverClass = $config->getDriver();
        // Validate Driver Class
        $reflection = new ReflectionClass($driverClass);
        // Ensure class is built with the correct interface
        if (false === $reflection->implementsInterface('Signalert\Storage\DriverInterface')) {
            throw new SignalertResolverException;
        }
        // If it all checks out, resolve the class and instantiate
        return $reflection->newInstance();

    }
public function getDriver ( ) { // Attempt to retrieve the driver config $ config = new Config ( $ this -> configDirectory ) ; $ driverClass = $ config -> getDriver ( ) ; // Validate Driver Class $ reflection = new ReflectionClass ( $ driverClass ) ; // Ensure class is built with the correct interface if ( false === $ reflection -> implementsInterface ( 'Signalert\Storage\DriverInterface' ) ) { throw new SignalertResolverException ; } // If it all checks out, resolve the class and instantiate return $ reflection -> newInstance ( ) ; }
Returns a valid driver class

@return DriverInterface
@throws SignalertResolverException
Returns a valid driver class