Class Zend_XmlRpc_Server_Cache

Description

Zend_XmlRpc_Server_Cache: cache Zend_XmlRpc_Server dispatch tables

Located in /Zend/XmlRpc/Server/Cache.php (line 35)


	
			
Method Summary
 static boolean delete (string $filename)
 static bool get (string $filename, Zend_XmlRpc_Server $server)
 static bool save (string $filename, Zend_XmlRpc_Server $server)
Methods
static delete (line 131)

Remove a cache file

  • access: public
static boolean delete (string $filename)
  • string $filename
static get (line 105)

Add dispatch table from a file

Unserializes a stored dispatch table from $filename. Returns false if it fails in any way, true on success.

Useful to prevent needing to build the dispatch list on each XMLRPC request. Sample usage:

  1.  if (!Zend_XmlRpc_Server_Cache::get($filename$server)) {
  2.      require_once 'Some/Service/Class.php';
  3.      require_once 'Another/Service/Class.php';
  4.  
  5.      // Attach Some_Service_Class with namespace 'some'
  6.           $server->attach('Some_Service_Class''some');
  7.  
  8.      // Attach Another_Service_Class with namespace 'another'
  9.           $server->attach('Another_Service_Class''another');
  10.  
  11.      Zend_XmlRpc_Server_Cache::save($filename$server);
  12.  }
  13.  
  14.  $response $server->handle();
  15.  echo $response;

  • access: public
static bool get (string $filename, Zend_XmlRpc_Server $server)
static save (line 50)

Cache a file containing the dispatch list.

Serializes the XMLRPC server callbacks array and stores the information in $filename.

Returns false on any error (typically, inability to write to file), true on success.

  • access: public
static bool save (string $filename, Zend_XmlRpc_Server $server)

Documentation generated on Wed, 21 Feb 2007 11:46:05 -0800 by phpDocumentor 1.3.1