src/ClientRegistry.php
public function getClient($name = null)
    {
        if (null === $name) {
            $name = $this->defaultClientName;
        }

        if (in_array($name, $this->getClientNames())) {
            return $this->clients[$name];
        }

        throw new \InvalidArgumentException(($name === null ? 'default client' : 'client ' . $name) . ' not configured');
    }
public function getClient($name = null)
    {
        if (null === $name) {
            $name = $this->defaultClientName;
        }

        if (in_array($name, $this->getClientNames())) {
            return $this->clients[$name];
        }

        throw new \InvalidArgumentException(($name === null ? 'default client' : 'client ' . $name) . ' not configured');
    }
public function getClient ( $ name = null ) { if ( null === $ name ) { $ name = $ this -> defaultClientName ; } if ( in_array ( $ name , $ this -> getClientNames ( ) ) ) { return $ this -> clients [ $ name ] ; } throw new \ InvalidArgumentException ( ( $ name === null ? 'default client' : 'client ' . $ name ) . ' not configured' ) ; }
Gets the named client.

@param string $name The client name (null for the default one).

@throws \InvalidArgumentException
@return Client
Gets the named client .