PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

AMF Responses

Occasionally you may desire to manipulate the response object slightly, typically to return extra message headers. The handle() method of the server returns the response object, allowing you to do so.

Example 30. Adding Message Headers to the AMF Response

In this example, we add a 'foo' MessageHeader with the value 'bar' to the response prior to returning it.

<?php
$response 
$server->handle();
$response->addAmfHeader(new Zend_Amf_Value_MessageHeader('foo'true'bar'))
echo 
$response;

Zend Framework