ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-Lib-Dev
php-Lib-Dev
[phplib-dev] cvs commit
by max other posts by this author
May 30 2001 5:20PM messages near this date
Re: [phplib-dev] cvs commit | [phplib-dev] cvs commit
From: max
Date: Wed May 30 11:08:54 2001
Modified files:
      php-lib/php/session/session4_custom.inc

Log message:
1. A typo.
2. Changed delete() to del(), do not use this function explicitly, 
it should be only used as the delete callback of the custom handler. Use the
inherited delete() instead to actually destroy the session.

Index: php-lib/php/session/session4_custom.inc
diff -u php-lib/php/session/session4_custom.inc:1.9 php-lib/php/session/session4_custom.inc:
1.10
--- php-lib/php/session/session4_custom.inc:1.9	Tue May 29 17:14:58 2001
+++ php-lib/php/session/session4_custom.inc	Wed May 30 11:08:53 2001
@@ -10,11 +10,11 @@
  * some of the code taken from Teodor Cimpoesu's session4 class
  * Copyright (c) 2000 Teodor Cimpoesu <teo@[...].net> 
  *
- * $Id: session4_custom.inc,v 1.9 2001/05/29 15:14:58 uw Exp $
+ * $Id: session4_custom.inc,v 1.10 2001/05/30 09:08:53 max Exp $
  *
  */ 
 
-class Session4_Custom extens Session4 {
+class Session4_Custom extends Session4 {
 
   /**
   *
@@ -114,7 +114,6 @@
   }
 
   
-  // the following functions used in session_set_save_handler
   
   // initialization
   function start() {
@@ -126,20 +125,32 @@
       $this-> get_id(); // otherwise get_id() is called in custom open() method
   }
   
+  // the following functions used in session_set_save_handler
+  
+  /* 
+     open callback
+     @access private
+  */
+  
   function open() {
     $this-> get_id();
     return true;
   }
 
+  /* 
+     close callback
+     @access private
+  */
   function close() {
     return true;
   }
   
   
-  /**
-   * delete the current session destroying all registered data
+  /*
+     delete callback.
+     @access private
    */
-  function delete () {
+  function del () {
     
     if ($this-> module == 'user') {
       $this-> that->ac_delete($this->id, $this->name);
@@ -150,11 +161,10 @@
     return true;
   }
   
-   /* freeze():
-    
-      freezes all registered things ( scalar variables, arrays, objects ) into
-      a database table    
-    */
+  /*
+     write callback.
+     @access private
+  */
   function freeze () {
     if ($this-> module == 'user') {
       $str = session_encode();
@@ -165,9 +175,10 @@
     return true;
   }
 
-  /* thaw():
-     get frozen session vars
-     */
+  /*
+     read callback.
+     @access private
+  */
   function thaw() {
   
       if ($this-> module == 'user') {
@@ -178,9 +189,11 @@
       return true;
   }
     
-  /* Garbage collection
+  /*
+     gc callback.
      Destroy all session data older than $this-> gc_time
-   */
+     @access private
+  */
   function gc() {
     if ($this-> module == 'user') {
     
@@ -212,7 +225,7 @@
             array (&$this, 'close'),
             array (&$this, 'thaw'),
             array (&$this, 'freeze'),
-            array (&$this, 'delete'),
+            array (&$this, 'del'),
             array (&$this, 'gc')
         );
         break;



---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe@[...].de
For additional commands, e-mail: phplib-dev-help@lists.netuse.de

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved