/** * Creates a new Client proxy, takes an url and an optional options object * that can also be an array * @param string $url * @param mixed $options */ public function __construct($url, $options = null) { $this->url = $url; $this->options = HessianOptions::resolveOptions($options); $this->typemap = new HessianTypeMap($this->options->typeMap); $this->factory = new HessianFactory(); }
/** * Creates a new HessianService instace to serve remote requests from Hessian clients * @param $serviceObject Class name or object instance * @param mixed $options array or HessianOptions object */ function __construct($serviceObject, $options = null) { $this->options = HessianOptions::resolveOptions($options); if ($serviceObject) { $this->registerObject($serviceObject); } $this->options->detectVersion = true; $this->typemap = new HessianTypeMap($this->options->typeMap); $this->factory = new HessianFactory(); // timezones HessianUtils::setTimeZone($this->options->timeZone); }