[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/zend/Zend/Server/ -> Cache.php (summary)

Zend Framework LICENSE

Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License: http://framework.zend.com/license/new-bsd New BSD License
Version: $Id$
File Size: 147 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Zend_Server_Cache:: (3 methods):
  save()
  get()
  delete()


Class: Zend_Server_Cache  - X-Ref

Zend_Server_Cache: cache server definitions

save($filename, Zend_Server_Interface $server)   X-Ref
Cache a file containing the dispatch list.

Serializes the server definition stores the information
in $filename.

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

param: string $filename
param: Zend_Server_Interface $server
return: bool

get($filename, Zend_Server_Interface $server)   X-Ref
Load server definition from a file

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

Useful to prevent needing to build the server definition on each
request. Sample usage:

<code>
if (!Zend_Server_Cache::get($filename, $server)) {
require_once 'Some/Service/Class.php';
require_once 'Another/Service/Class.php';

// Attach Some_Service_Class with namespace 'some'
$server->attach('Some_Service_Class', 'some');

// Attach Another_Service_Class with namespace 'another'
$server->attach('Another_Service_Class', 'another');

Zend_Server_Cache::save($filename, $server);
}

$response = $server->handle();
echo $response;
</code>

param: string $filename
param: Zend_Server_Interface $server
return: bool

delete($filename)   X-Ref
Remove a cache file

param: string $filename
return: boolean



Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1