src/ResourceManager.php
public static function create($driver, array $args = [])
    {
        if (is_string($driver) && lcfirst($driver) === 'doctrine') {
            return new DoctrineResourceManager(new DoctrineDriver($args));
        } elseif ($driver instanceof DoctrineDriver) {
            return new DoctrineResourceManager($driver);
        }

        throw new \InvalidArgumentException(sprintf(
            'The driver "%s" can not be found.',
            is_string($driver) ? lcfirst($driver) : get_class($driver)
        ));
    }
public static function create($driver, array $args = [])
    {
        if (is_string($driver) && lcfirst($driver) === 'doctrine') {
            return new DoctrineResourceManager(new DoctrineDriver($args));
        } elseif ($driver instanceof DoctrineDriver) {
            return new DoctrineResourceManager($driver);
        }

        throw new \InvalidArgumentException(sprintf(
            'The driver "%s" can not be found.',
            is_string($driver) ? lcfirst($driver) : get_class($driver)
        ));
    }
public static function create ( $ driver , array $ args = [ ] ) { if ( is_string ( $ driver ) && lcfirst ( $ driver ) === 'doctrine' ) { return new DoctrineResourceManager ( new DoctrineDriver ( $ args ) ) ; } elseif ( $ driver instanceof DoctrineDriver ) { return new DoctrineResourceManager ( $ driver ) ; } throw new \ InvalidArgumentException ( sprintf ( 'The driver "%s" can not be found.' , is_string ( $ driver ) ? lcfirst ( $ driver ) : get_class ( $ driver ) ) ) ; }
Create a instance of ResourceManagerInterface.

@param  string|DriverInterface $driver driver name
@param  array  $args                   if the fisrt argument is a string this
argument is used to set the driver options.

@return ResourceManagerInterface

@throws \InvalidArgumentException
Create a instance of ResourceManagerInterface .