Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

cache_container.php

Go to the documentation of this file.
00001 
00002 /** @file cache_container.php
00003 * Definition of class cache_container
00004 * @todo remove
00005 */
00006 #include "xml_event_parser_user.php"
00007 /**
00008 * Abstract cache container.
00009 */
00010 class cache_container : public  xml_event_parser_user
00011 {
00012 public:
00013   /** Name of cache file. */
00014   var cache_name = '';
00015   /** Clear cache. */
00016   function clear()
00017   {
00018     if( this->cache_name != '' )
00019       if( is_file( this->cache_name ) )
00020         if( !unlink( this->cache_name ) )
00021           return this->err( 'Cannot delete cache file: '.this->cache_name, 'clear', __LINE__, __FILE__ );
00022   }
00023   /** Get data from cache. */
00024   function get( data )
00025   {
00026     if( this->cache_name != '' )
00027       if( is_file( this->cache_name ) )
00028         return this->get_cached( data );
00029       else
00030       {
00031         this->cache();
00032         return this->get_cached( data );
00033       }
00034     else
00035       return this->err( 'Cache file name not specified', 'get', __LINE__, __FILE__ );
00036   }
00037   /** Get cached data. */
00038   function get_cached( data )
00039   {
00040     return false;
00041   }
00042   /** Cache data. */
00043   function cache()
00044   {
00045   }
00046 }
00047 X-Powered-By: PHP/4.0.8-dev
00048 Content-type: text/html
00049 
00050 

Generated on Tue Mar 11 08:35:12 2003 for SES by doxygen1.2.16