KnpU\OAuth2ClientBundle\Client\ClientRegistry::getClient PHP Method

getClient() public method

Easy accessor for client objects.
public getClient ( string $key ) : OAuth2Client
$key string
return OAuth2Client
    public function getClient($key)
    {
        if (!isset($this->serviceMap[$key])) {
            throw new \InvalidArgumentException(sprintf('There is no OAuth2 client called "%s". Available are: %s', $key, implode(', ', array_keys($this->serviceMap))));
        }
        return $this->container->get($this->serviceMap[$key]);
    }