| Overview Package Tree | HessianPHP |
| FRAMES NO FRAMES | |
| SUMMARY: FIELD METHOD | DETAIL: FIELD METHOD |
HessianPHP.Server.HessianService
class HessianService
Enables a common PHP object to be published as a Hessian compatible web-service via a POST request.It wraps a PHP object that executes the real methods passed by the HessianService class. Example usage:
$wrapper = &new HessianService();
$wrapper->registerObject(new ServiceObject());
$wrapper->service();
Then clients can perform method calls to the url of the service, ex. http://localhost/hessian/testservice.php TODO:
- Support for the _hessian* magic methods
| Field Summary |
|---|
| public var | $serviceInfo |
| public var | $fault |
| public var | $writer |
| public var | $parser |
| public var | $displayInfo |
| public var | $errorReporting |
| private var | $_restoreError |
| Method Summary |
|---|
| public void | HessianService |
| public void | registerObject |
| public void | service Publishes the service, check incoming calls and routes them to the wrapped object. |
| Field Detail |
|---|
public var $serviceInfopublic var $fault = falsepublic var $writerpublic var $parserpublic var $displayInfo = falsepublic var $errorReportingprivate var $_restoreError
| Method Detail |
|---|
public void HessianService(var $name = '')
$namepublic void registerObject(var $service)
$servicepublic void service()
Publishes the service, check incoming calls and routes them to the wrapped object.
This method uses streams to retrieve raw POST bytes and a "HessianPHP.HessianParser HessianParser" and "HessianPHP.HessianWriter HessianWriter" to execute the call and send results back to the client.
As defined in Hessian 1.0 spec, the service requires POST to execute. It is advised not to call
any other php code that writes to the default screen output (echo, print, etc.) as it can corrupt the reply.
| Overview Package Tree | HessianPHP |
| FRAMES NO FRAMES | |
| SUMMARY: FIELD METHOD | DETAIL: FIELD METHOD |