src/wcmf/lib/service/RemotingServer.php
private function getClient($serverKey) {
    if (!isset($this->clients[$serverKey])) {
      $config = ObjectFactory::getInstance('configuration');
      $serverDef = $config->getValue($serverKey, 'remoteserver');
      // get remote the user
      $user = $this->getRemoteUser($serverKey);

      $client = null;
      if (strpos($serverDef, 'http://') === 0 || strpos($serverDef, 'https://') === 0) {
        $client = new HTTPClient($serverDef, $user);
      }
      else {
        $client = new RPCClient($serverDef, $user);
      }
      $this->clients[$serverKey] = $client;
    }
    return $this->clients[$serverKey];
  }
private function getClient($serverKey) {
    if (!isset($this->clients[$serverKey])) {
      $config = ObjectFactory::getInstance('configuration');
      $serverDef = $config->getValue($serverKey, 'remoteserver');
      // get remote the user
      $user = $this->getRemoteUser($serverKey);

      $client = null;
      if (strpos($serverDef, 'http://') === 0 || strpos($serverDef, 'https://') === 0) {
        $client = new HTTPClient($serverDef, $user);
      }
      else {
        $client = new RPCClient($serverDef, $user);
      }
      $this->clients[$serverKey] = $client;
    }
    return $this->clients[$serverKey];
  }
private function getClient ( $ serverKey ) { if ( ! isset ( $ this -> clients [ $ serverKey ] ) ) { $ config = ObjectFactory :: getInstance ( 'configuration' ) ; $ serverDef = $ config -> getValue ( $ serverKey , 'remoteserver' ) ; // get remote the user $ user = $ this -> getRemoteUser ( $ serverKey ) ; $ client = null ; if ( strpos ( $ serverDef , 'http://' ) === 0 || strpos ( $ serverDef , 'https://' ) === 0 ) { $ client = new HTTPClient ( $ serverDef , $ user ) ; } else { $ client = new RPCClient ( $ serverDef , $ user ) ; } $ this -> clients [ $ serverKey ] = $ client ; } return $ this -> clients [ $ serverKey ] ; }
Get a client instance for a given server key
@param $serverKey An entry in the configuration section 'remoteserver'
@return A client instance or null
Get a client instance for a given server key