public static function createInstance($driver, $options)
    {
        if(!in_array($driver, self::$_validDrivers)) {
            throw new \Exception("Driver '{$driver}' not implemented");
        }

        $class = __NAMESPACE__ . '\\Driver\\' . $driver;

        $driver = new $class;
        $driver->setOptions($options);

        return new Storage($driver);
    }
public static function createInstance($driver, $options)
    {
        if(!in_array($driver, self::$_validDrivers)) {
            throw new \Exception("Driver '{$driver}' not implemented");
        }

        $class = __NAMESPACE__ . '\\Driver\\' . $driver;

        $driver = new $class;
        $driver->setOptions($options);

        return new Storage($driver);
    }
public static function createInstance ( $ driver , $ options ) { if ( ! in_array ( $ driver , self :: $ _validDrivers ) ) { throw new \ Exception ( "Driver '{$driver}' not implemented" ) ; } $ class = __NAMESPACE__ . '\\Driver\\' . $ driver ; $ driver = new $ class ; $ driver -> setOptions ( $ options ) ; return new Storage ( $ driver ) ; }
Create new instance of G4\Storage\Storage

@param string $driver
@param array $options

@throws \Exception
@return \G4\Storage\Storage
Create new instance of G4 \ Storage \ Storage