protected function resolve($name)
    {
        $config = $this->getConfig($name);

        if (empty($config)) {
            throw new InvalidArgumentException("Source repository [{$name}] is not defined.");
        }

        if (isset($this->customSourceCreators[$config['type']])) {
            return $this->callCustomSourceCreators($config);
        }
        $repositoryMethod = 'create'.ucfirst($name).'Repository';

        if (method_exists($this, $repositoryMethod)) {
            return $this->{$repositoryMethod}($config);
        }
        throw new InvalidArgumentException("Repository [{$name}] is not supported.");
    }
protected function resolve($name)
    {
        $config = $this->getConfig($name);

        if (empty($config)) {
            throw new InvalidArgumentException("Source repository [{$name}] is not defined.");
        }

        if (isset($this->customSourceCreators[$config['type']])) {
            return $this->callCustomSourceCreators($config);
        }
        $repositoryMethod = 'create'.ucfirst($name).'Repository';

        if (method_exists($this, $repositoryMethod)) {
            return $this->{$repositoryMethod}($config);
        }
        throw new InvalidArgumentException("Repository [{$name}] is not supported.");
    }
protected function resolve ( $ name ) { $ config = $ this -> getConfig ( $ name ) ; if ( empty ( $ config ) ) { throw new InvalidArgumentException ( "Source repository [{$name}] is not defined." ) ; } if ( isset ( $ this -> customSourceCreators [ $ config [ 'type' ] ] ) ) { return $ this -> callCustomSourceCreators ( $ config ) ; } $ repositoryMethod = 'create' . ucfirst ( $ name ) . 'Repository' ; if ( method_exists ( $ this , $ repositoryMethod ) ) { return $ this -> { $ repositoryMethod } ( $ config ) ; } throw new InvalidArgumentException ( "Repository [{$name}] is not supported." ) ; }
Try to find the correct source repository implementation ;-).

@param string $name

@throws InvalidArgumentException

@return mixed
Try to find the correct source repository implementation ; - ) .