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');
    }