Sets the client.

@param  Client|string $pClient
@return Server        $this
492375
public function setClient($pClient)
    {
        if (is_string($pClient)) {
            $pClient = new $pClient($this);
        }

        $this->client = $pClient;
        $this->client->setupFormats();

        return $this;
    }
1071845
public function setClient(\Gpupo\CommonSchema\ORM\Entity\Application\API\OAuth\Client\Client $client = null)
    {
        $this->client = $client;

        return $this;
    }
722838
public function setRequest(\Psr\Http\Message\ServerRequestInterface $p_request)
    {
        $this->request = $p_request;
        return $this;
    }
1252037
public function add(ClientInterface $client)
    {
        $this->clients[$client->getClientType()][$client->getClientIdentifier()] = $client;

        return $this;
    }
599401
public function setProtocol($protocol) {

        if ( empty($protocol) || !in_array($protocol, $this->supported_protocols) ) throw new InvalidArgumentException('Invalid or unsupported RPC protocol');

        $this->protocol = $protocol;

        return $this;

    }
1071119
public void addClient(String pUserName, WebSocketSession pClient) {
        if (!mClients.containsKey(pUserName)) {
            LogHelper.info("", "增加客户端；name:" + pUserName, "MyClientFactory.addClient");
            mClients.put(pUserName, pClient);
            onAddClient(pUserName, pClient);
        } else {
            if (!mClients.get(pUserName).getId().equals(pClient.getId()) && mClients.get(pUserName).isOpen()) {
                changeClient(pUserName, pClient);
            }
        }
    }
1338440
public function setClass($pClass)
    {
        if (is_string($pClass)) {
            $this->createControllerClass($pClass);
        } elseif (is_object($pClass)) {
            $this->controller = $pClass;
        } else {
            $this->controller = $this;
        }
    }
1257716
public function setProtocol($protocol) {

        $proto = strtoupper($protocol);

        if ( !in_array($proto, static::$supported_protocols) ){
            throw new Exception("Invalid RPC protocol");
        }

        $this->protocol = $proto;

        return $this;

    }
894196
public function setCasServer($server)
    {
        $this->casServer = $server;
        $this->guzzleClient = new Client(['base_uri' => $server, 'cookies' => true]);
    }
156118
function setClientCert($crtFile, $keyFile)
    {
        if(!file_exists($crtFile)) {
            $this->debugMessage("Client certificate not found");
            return;
        }

        if(!file_exists($keyFile)) {
            $this->debugMessage("Client key not found");
            return;
        }

        $this->clientCrt = $crtFile;
        $this->clientKey = $keyFile;
    }
1198324
public function setCpusetCpus(string $cpusetCpus)
    {
        $this->cpusetCpus = $cpusetCpus;

        $this->hostConfig = array_merge($this->hostConfig, [' CpusetCpus' => $cpusetCpus]);

        return $this;
    }
1307426
public function set($data = null)
    {
        $this->server = isset($data) ? $data : $_SERVER;
        return $this;
    }
1080775
public function setClientStorage(ClientInterface $storage)
    {
        $storage->setServer($this);
        $this->clientStorage = $storage;

        return $this;
    }
1074149
private function initSoapClient()
    {
        if (!isset($this->service))
        {
            throw new ClientException("Not set service");
        }

        if ($this->soapClient === null)
        {
            $this->soapClient = new SoapClient($this->service, $this->cert, $this->trace, $this->curlOptions);
        }
    }
878460
public function setHttpClient($client)
    {
        if ($client instanceof CheddarGetter_Client_AdapterInterface) {
            $this->_httpClient = $client;
            return $this;
        }

        // Allows passing the curl resource or the Zend_Http_Client for BC reasons
        if ($client instanceof Zend_Http_Client) {
            $this->_httpClient = new CheddarGetter_Client_ZendAdapter($client);
            return $this;
        }
        if (is_resource($client) && get_resource_type($client) == 'curl') {
            $this->_httpClient = new CheddarGetter_Client_CurlAdapter($client);
            return $this;
        }

        throw new CheddarGetter_Client_Exception("httpClient can only be an instance of CheddarGetter_Client_AdapterInterface or Zend_Http_Client or a php curl resource.", CheddarGetter_Client_Exception::USAGE_INVALID);
    }
1312210
public function setClientPlatform($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->client_platform !== $v) {
            $this->client_platform = $v;
            $this->modifiedColumns[LoginLogTableMap::COL_CLIENT_PLATFORM] = true;
        }

        return $this;
    }
1309902
public function setIpcMode(string $ipcMode)
    {
        $this->ipcMode = $ipcMode;

        $this->hostConfig = array_merge($this->hostConfig, ['IpcMode' => $ipcMode]);

        return $this;
    }