/** * @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; }
/** * * @return \Bootstrap\Autoloader */ public function init() { spl_autoload_register(array($this, 'loadByNamespace')); \PHPClient\JMTextRpcClient::config((array) new \Config\PHPClient()); return $this; }