src/filesystem/FilesystemManager.php
protected function resolve($name)
    {
        $config = $this->disks[$name];
        if (isset($config['class'])) {
            return Yii::createObject($config);
        } else if (isset($config['adapter'])) {
            $driverMethod = 'create' . ucfirst($config['adapter']) . 'Adapter';
            if (method_exists($this, $driverMethod)) {
                return $this->{$driverMethod}($config);
            } else {
                throw new InvalidArgumentException("Adapter [{$config['adapter']}] is not supported.");
            }
        } else {
            throw new InvalidArgumentException("Wrong adapter configuration.");
        }
    }
protected function resolve($name)
    {
        $config = $this->disks[$name];
        if (isset($config['class'])) {
            return Yii::createObject($config);
        } else if (isset($config['adapter'])) {
            $driverMethod = 'create' . ucfirst($config['adapter']) . 'Adapter';
            if (method_exists($this, $driverMethod)) {
                return $this->{$driverMethod}($config);
            } else {
                throw new InvalidArgumentException("Adapter [{$config['adapter']}] is not supported.");
            }
        } else {
            throw new InvalidArgumentException("Wrong adapter configuration.");
        }
    }
protected function resolve ( $ name ) { $ config = $ this -> disks [ $ name ] ; if ( isset ( $ config [ 'class' ] ) ) { return Yii :: createObject ( $ config ) ; } else if ( isset ( $ config [ 'adapter' ] ) ) { $ driverMethod = 'create' . ucfirst ( $ config [ 'adapter' ] ) . 'Adapter' ; if ( method_exists ( $ this , $ driverMethod ) ) { return $ this -> { $ driverMethod } ( $ config ) ; } else { throw new InvalidArgumentException ( "Adapter [{$config['adapter']}] is not supported." ) ; } } else { throw new InvalidArgumentException ( "Wrong adapter configuration." ) ; } }
Resolve the given disk.

@param  string $name
@return object|Filesystem
@throws \yii\base\InvalidConfigException
Resolve the given disk .