Question

I use Zend Rest Server class to handle rest srvice:

 public function restAction() {
        $service = new Zend_Rest_Server();
        $service->setClass($this->_serviceClassName);
        $service->handle();
    }

In the Zend_Rest_Server the response header

<myApi generator="zend" version="1.0">

How to change the generator to different string?

Thanks Arman.

Was it helpful?

Solution

Well I found not so elegant solution but it works:

 $service->returnResponse(TRUE);
 $response = $service->handle();

 header('Content-Type: text/xml');

 // replace generator="zend" with my_app
 echo str_replace('generator="zend"', 'generator="my_app"', $response);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top