KnpU\OAuth2ClientBundle\DependencyInjection\ProviderFactory::createProvider PHP Method

createProvider() public method

Creates a provider of the given class.
public createProvider ( string $class, array $options, string $redirectUri, array $redirectParams = [] ) : mixed
$class string
$options array
$redirectUri string
$redirectParams array
return mixed
    public function createProvider($class, array $options, $redirectUri, array $redirectParams = [])
    {
        $redirectUri = $this->generator->generate($redirectUri, $redirectParams, UrlGeneratorInterface::ABSOLUTE_URL);
        $options['redirectUri'] = $redirectUri;
        // todo - make this configuration when someone needs this
        $collaborators = [];
        return new $class($options, $collaborators);
    }