0

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.

Arman
  • 4,566
  • 10
  • 45
  • 66

1 Answers1

0

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);
Arman
  • 4,566
  • 10
  • 45
  • 66