Prev | Current Page 304 | Next

Rob Allen, Nick Lo, and Steven Brown

"Zend Framework in Action"

We will start by setting up an XML-RPC server using
Zend_XmlRpc_Server.
11.3.1 Zend_XmlRpc_Server
Zend_XmlRpc_Server is used to implement the single point of entry for XML-RPC requests and in that
respect acts in much the same way that Zend Framework??™s Front Controller does. In fact you can make your
XML-RPC server a controller action that receives its request via the front controller but that would involve a
lot of unnecessary processing overhead. Instead we??™re going to separate out the bootstrapping process a little.
Setting up the bootstrapping
If you??™ve read previous chapters, you??™ll already be aware that the Zend Framework MVC structure relies
on mod_rewrite settings in a .htaccess file to pass all requests via a front controller file like index.php. Since
our XML-RPC server has its own single point of entry we need to exclude it from that rewrite rule. In listing
11.2 we do that by adding a rewrite condition that excludes any requests for /xmlrpc from the final rewrite rule
that passes requests to index.php.
Listing 11.2 Rewrite rules modified to allow requests through to the XML-RPC server
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/css
RewriteCond %{REQUEST_URI} !^/img
RewriteCond %{REQUEST_URI} !^/js
RewriteCond %{REQUEST_URI} !^/xmlrpc A
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.


Pages:
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
tłumacz niemieckiego hosting zakłady bukmacherskie serwis drukarek katowice petrozawodzkich.waw.pl