phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] api class.statecache.php,NONE,1.1.2.1


From: Dan Kuykendall <address@hidden>
Subject: [Phpgroupware-cvs] api class.statecache.php,NONE,1.1.2.1
Date: Mon, 03 Nov 2003 18:19:55 +0000

Update of /cvsroot/phpgroupware/api
In directory subversions:/tmp/cvs-serv16876/api

Added Files:
      Tag: proposal-branch
        class.statecache.php 
Log Message:
added initial statecache class

--- NEW FILE: class.statecache.php ---
<?php
        
/**************************************************************************\
        * phpGroupWare                                                          
   *
        * http://www.phpgroupware.org                                           
   *
        * This file written by Dan Kuykendall <address@hidden>                 *
        * Copyright (C) 2003 Dan Kuykendall                                     
   *
        * 
-------------------------------------------------------------------------*
        * This library is part of the phpGroupWare API                          
   *
        * http://www.phpgroupware.org/api                                       
   * 
        * 
------------------------------------------------------------------------ *
        * This library is free software; you can redistribute it and/or modify 
it  *
        * under the terms of the GNU Lesser General Public License as published 
by *
        * the Free Software Foundation; either version 2.1 of the License,      
   *
        * or any later version.                                                 
   *
        * This library is distributed in the hope that it will be useful, but   
   *
        * WITHOUT ANY WARRANTY; without even the implied warranty of            
   *
        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                  
   *
        * See the GNU Lesser General Public License for more details.           
   *
        * You should have received a copy of the GNU Lesser General Public 
License *
        * along with this library; if not, write to the Free Software 
Foundation,  *
        * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA         
   *
        
\**************************************************************************/

        /* $Id: class.statecache.php,v 1.1.2.1 2003/11/03 18:19:50 seek3r Exp $ 
*/

        class api_statecache
        {
                var $data = Array();

                function pre_serialize()
                {
                        // stub so its gets cache'd. No cleanup needed.
                }
                
                function post_serialize()
                {
                        // stub. No restore needed.
                }
                
                function pause ()
                {
                        $args = $args->get(func_get_args(),__LINE__,__FILE__);
                        
                        if (isset($GLOBALS['phpgw_data']['api']['prevop']))
                        {
                                
$this->data[$GLOBALS['phpgw_data']['api']['prevop']] = func_get_args();
                        }
                }
                
                function restore ()
                {
                        
if(isset($this->data[$GLOBALS['phpgw_data']['api']['op']]))
                        {
                                return array_merge(func_get_args(), 
$this->data[$GLOBALS['phpgw_data']['api']['op']]);
                        }
                        else
                        {
                                return func_get_args();
                        }
                }

                function clear ()
                {
                        
if(isset($this->data[$GLOBALS['phpgw_data']['api']['op']]))
                        {
                                
unset($this->data[$GLOBALS['phpgw_data']['api']['op']]);
                        }
                        return func_get_args();
                }
        }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]