Source for file OCSP_CMS_CACHE.phpclass

Documentation is available at OCSP_CMS_CACHE.phpclass

  1. <?php
  2. /**
  3.   * openCSP class file
  4.   *
  5.   * @project Open CSP-Management
  6.   * @package cms
  7.   *
  8.   * @author Peter Krebs <pitlinz@users.sourceforge.net>
  9.   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  10.   *
  11.   * @since pk-16.06.2008
  12.   * @version $Id: OCSP_CMS_CACHE.phpclass,v 1.4 2008/08/08 02:00:43 pitlinz Exp $
  13.   */
  14.  
  15. // ---------------------------------------------------------
  16. // requirements
  17. // ---------------------------------------------------------
  18.  
  19. pcf_require_interface('INFA_OCSP_CACHE',__OCSP_PHPINCPATH__ "cache/INFA_OCSP_CACHE.phpclass");
  20. pcf_require_class('OCSP_CACHE_FILE',__OCSP_PHPINCPATH__ "cache/OCSP_CACHE_FILE.phpclass");
  21.  
  22. /**
  23.   * openCSP class file
  24.   *
  25.   * @project Open CSP-Management
  26.   * @package cms
  27.   *
  28.   * @author Peter Krebs <pitlinz@users.sourceforge.net>
  29.   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  30.   *
  31.   * @since pk-16.06.2008
  32.   * @version $Id: OCSP_CMS_CACHE.phpclass,v 1.4 2008/08/08 02:00:43 pitlinz Exp $
  33.   */
  34. class OCSP_CMS_CACHE extends OCSP_CACHE_FILE implements INFA_OCSP_CACHE
  35. {
  36.     /*** class constants  --------------------------------------------- */
  37.  
  38.     /**
  39.      * @constant string CLASS_SRC_FILE
  40.      *
  41.      * @abstract
  42.      */
  43.     const CLASS_SRC_FILE = __FILE__;
  44.     
  45.     /*** class variables  --------------------------------------------- */
  46.  
  47.     /**
  48.      * cache subdir
  49.      * @var string $cacheSubDirName 
  50.      */        
  51.     protected static $cacheSubDirName 'ocsp_cms';    
  52.         
  53.     /*** class functions  --------------------------------------------- */
  54.         
  55.     
  56.     /*** compostion --------------------------------------------------- */
  57.     
  58.     /*** attributes  -------------------------------------------------- */
  59.     
  60.     /*** factory / construct  ----------------------------------------- */
  61.     
  62.     /**
  63.      * returns the instance of the singleton class
  64.      *
  65.      * @param string $group // ignored here this is replaced with $_SERVER['SERVERNAME'±
  66.      * 
  67.      * @return OCSP_CMS_CACHE 
  68.      */
  69.     public static function getInstance($group='_NOT_USED_HERE_')
  70.     {
  71.         // disable empty groups 
  72.         $group str_replace(".","_",$_SERVER['SERVER_NAME']);
  73.         
  74.         if (!isset(self::$cacheInstances['CMSCACHE'][$group]|| !pcf_is_instance_of(self::$cacheInstances['CMSCACHE'][$group],'OCSP_CMS_CACHE'))
  75.         {
  76.              self::$cacheInstances['CMSCACHE'][$groupnew OCSP_CMS_CACHE($group);    
  77.         }         
  78.         return self::$cacheInstances['CMSCACHE'][$group];
  79.     }    
  80.     
  81.     /*** getter / setter ---------------------------------------------- */
  82.  
  83.     /*** project methods ---------------------------------------------- */
  84.     
  85.     /**
  86.      * returns the project row
  87.      *
  88.      * @param int $aId 
  89.      * @param boolean $debug 
  90.      * 
  91.      * @return array 
  92.      */
  93.     public function getProjRow($aId,$debug=False)    
  94.     {
  95.         return Null;
  96.     }
  97.     
  98.     /**
  99.      * returns the project row for $_SERVER['SERVER_NAME']
  100.      *
  101.      * @param boolean $debug 
  102.      * 
  103.      * @return array 
  104.      */
  105.     public function getServerProjRow($debug=False)
  106.     {
  107.         return Null;
  108.     }
  109.  
  110.     /**
  111.      * returns the project row of the default project
  112.      *
  113.      * @param boolean $debug 
  114.      * 
  115.      * @return array 
  116.      */
  117.     public function getDefaultProjRow($debug=False)
  118.     {
  119.         return Null;
  120.     }
  121.     
  122.     
  123.     
  124.     /*** menu methods ------------------------------------------------- */
  125.     
  126.     /**
  127.      * returns the cache menu row
  128.      *
  129.      * @param string $aKey 
  130.      * @param boolean $debug 
  131.      * 
  132.      * @return array 
  133.      */
  134.     public function getMenuRow($aKey,$debug=False)
  135.     {
  136.         return Null;
  137.     }
  138.     
  139.     /**
  140.      * returns an array with children keys of menu with key $aKey
  141.      *
  142.      * @param string $aKey 
  143.      * @param boolean $debug 
  144.      * 
  145.      * @return array 
  146.      */
  147.     public function getMenuChildrenRowArray($aKey,$debug=False)
  148.     {
  149.         return Null;
  150.     }
  151.     
  152.     /**
  153.      * stores a menu node to the cache
  154.      *
  155.      * @param CMS_MENU_NODE $menuObj 
  156.      * @param boolean $debug 
  157.      */
  158.     public function storeMenuObj($menuObj,$debug=False)
  159.     {
  160.         
  161.     }
  162.  
  163.     
  164.     /*** page methods ------------------------------------------------- */
  165.     
  166.     /**
  167.      * tries to get a page object from the environment
  168.      *
  169.      * @param boolean $debug 
  170.      * 
  171.      * @return 
  172.      */
  173.     public function getPageFromEnv($debug=False)
  174.     {
  175.         return Null;
  176.     }
  177.     
  178.     /**
  179.      * returns the cached page row (if found)
  180.      *
  181.      * @param int $aPagId 
  182.      * @param boolean $debug 
  183.      * 
  184.      * @return array | Null
  185.      */
  186.     public function getPageRow($aPagId,$debug=False)
  187.     {
  188.         return Null;
  189.     }
  190.     
  191.     /**
  192.      * stores a page to the cache
  193.      * 
  194.      * @param CMS_PAGE $pageObj 
  195.      * @param boolean $debug 
  196.      * 
  197.      */
  198.     public function storePage($pageObj,$debug=False)
  199.     {
  200.         
  201.     }
  202.     
  203.     /**
  204.      * clears the page cache for $obj_page
  205.      *
  206.      * @param CMS_PAGE $obj_page 
  207.      * @param boolean $debug 
  208.      */
  209.     public function clearPageCache($pageObj,$debug=False)
  210.     {
  211.         
  212.     }
  213.     
  214.     /*** page methods ------------------------------------------------- */
  215.     
  216.     public function getPageChapters($pagId,$langId=0,$debug=False)
  217.     {
  218.         return Null;    
  219.     }
  220.     
  221.     public function setPageChapters($chapters,$langId=0,$debug=False)
  222.     {
  223.         
  224.     }
  225.     
  226. }
  227.  
  228. ?>

Documentation generated on Thu, 08 Jan 2009 17:45:13 +0100 by phpDocumentor 1.4.0a2