| Writes the current DOMIT_Document to the filesystem, based on the specified xml filename. The cache files have a '.dch' extension. |
Signature: toCache($xmlFileName, &$doc, $writeAttributes = "wb") |
Parameters:
String xmlFileName - A file name for the cached file. Any extensions will be stripped and a '.dch' extension added.
DOMIT_Document doc - The DOMIT_Document that is to be cached.
String writeAttributes - The write attributes for the cached file. Default is 'w'
|
Returns:
boolean - True if the write operation is successful.
|
Example:
Caches the current DOMIT_Document. $success = DOMIT_Cache::toCache("myCachedDoc.xml", $xmldoc); |
| Retrieves the specified DOMIT_Document from the filesystem, based on the specified xml filename. |
Signature: &fromCache($xmlFileName) |
Parameters:
String xmlFileName - A file name for the cached file to be retrieved. Any extensions will be stripped and a '.dch' extension added.
|
Returns:
DOMIT_Document - A copy of the retrieved DOMIT_Document.
|
Example:
Retrieves the DOMIT_Document from the cache. $xmldoc =& DOMIT_Cache::fromCache("myCachedDoc.xml"); |
| Determines whether the specified cache file exists. |
Signature: cacheExists($xmlFileName) |
Parameters:
String xmlFileName - A file name for the cached file to be retrieved. Any extensions will be stripped and a '.dch' extension added.
|
Returns:
boolean - True if the specified cache file exists.
|
Example:
Retrieves the DOMIT_Document from the cache. $xmldoc =& DOMIT_Cache::fromCache("myCachedDoc.xml"); |
| Removes the specified cache file from the file system. |
Signature: removeFromCache($xmlFileName) |
Parameters:
String xmlFileName - A file name for the cached file to be removed. Any extensions will be stripped and a '.dch' extension added.
|
Returns:
boolean - True if the specified cache file was removed.
|
Example:
Removes the DOMIT_Document from the cache. $success = DOMIT_Cache::removeFromCache("myCachedDoc.xml"); |