예제 #1
0
파일: Text.php 프로젝트: nangong92t/go_src
 /**
  * @param string $name Service classname to use.
  * @return $this
  */
 public function setClass($name)
 {
     $config = parent::config();
     if (isset($config[$this->configName]['ver']) && version_compare($config[$this->configName]['ver'], '2.0', '<')) {
         $className = 'RpcClient_' . $this->configName . '_' . $name;
     } else {
         $className = 'RpcClient_' . $name;
     }
     $this->rpcClass = $className;
     return $this;
 }
예제 #2
0
 /**
  *
  * @return \Bootstrap\Autoloader
  */
 public function init()
 {
     spl_autoload_register(array($this, 'loadByNamespace'));
     \PHPClient\JMTextRpcClient::config((array) new \Config\PHPClient());
     return $this;
 }