/** * class constructor needs rpc server as first parameter either as instance * or driver string, e.g. "json", if empty will create default server with * "json" driver. the third parameter expects a absolute file pointer or string * of php.ini style which can also be used to define all class options and control * the behaviour of the gateway * * @error 14001 * @param null|string|Xapp_Rpc_Server $server expects on of the above explained values * @param null|array|object $options expects optional options * @param null|string $conf expects file pointer or string of gateway config */ public function __construct($server = null, $options = null, $conf = null) { if ($server instanceof Xapp_Rpc_Server) { $this->_server = $server; } else { if (is_null($server)) { $this->_server = Xapp_Rpc_Server::factory('json'); } else { $this->_server = Xapp_Rpc_Server::factory((string) $server); } } if ($options !== null) { xapp_init_options($options, $this); } if ($conf !== null) { $this->conf($conf); } $this->init(); }