On success it returns the required boolean and on failure an exception is
thrown that will be handled by Zend_XmlRpc_Server.
You??™ll notice that the editPost() method is really only minimally different from any standard method in
that it has the docblock parameter data type ???struct???, which isn??™t a native PHP data type. The reason for this is
that when you use Zend_XmlRpc_Server::setClass() or Zend_XmlRpc_Server::addFunction(),
Zend_Server_Reflection checks all methods or functions and determines their method help text and signatures
using the docblocks.
Licensed to Menshu You
Zend Framework in Action (Ch01) Manning Publications Co. 26
Referring to table 11.1 we can see that in the case of the @param $struct the datatype has been set to the
XML-RPC type ???struct??? that corresponds with the PHP type ???associative array??? which is processed using the
Zend_XmlRpc_Value object Zend_XmlRpc_Value_Struct.
Using these mappings we can at any time call on an Zend_XmlRpc_Value object to prepare values for
XML-RPC such as is often needed when preparing values in an array, for example:
array('dateCreated' => new Zend_XmlRpc_Value_DateTime(
$row->date_created, Zend_XmlRpc_Value::XMLRPC_TYPE_DATETIME);
The above example formats a date from a database table row into the ISO8601 format required by XMLRPC.
Pages:
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325