--- /dev/null
+#+TITLE: IPF XML-RPC
+
+XML-RPC engine extracted from IPF web framework
+
+* Example
+
+ #+BEGIN_SRC php
+ function Api_Views_Handler($request, $match)
+ {
+ $server = new IPF_XmlRpc_Server();
+
+ $server->addFunction('getCustomers');
+ $server->addFunction('getProducts');
+
+ return new IPF_Http_Response($server->handle());
+ }
+
+ function getCustomers()
+ {
+ return IPF_ORM_Manager::connection()->fetchAll('select * from customer');
+ }
+
+ function getProducts($parameters)
+ {
+ $customer = (int)$parameters['customer'];
+ $query = 'select * from product';
+ if ($customer)
+ $query .= ' where customer_id = ' . $customer;
+ return IPF_ORM_Manager::connection()->fetchAll($query);
+ }
+ #+END_SRC
+