[phpwebapp-commits] CVS: web_app/session func.GoTo.js,1.2,1.3 class.Session.php,1.4,1.5 class.Reques
Brought to you by:
dashohoxha
|
From: Dashamir H. <das...@us...> - 2003-08-22 20:44:39
|
Update of /cvsroot/phpwebapp/web_app/session
In directory sc8-pr-cvs1:/tmp/cvs-serv6393/session
Modified Files:
func.GoTo.js class.Session.php class.Request.php
class.Event.php
Log Message:
modified a little bit the comments
Index: func.GoTo.js
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/session/func.GoTo.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** func.GoTo.js 16 Jul 2003 09:27:59 -0000 1.2
--- func.GoTo.js 22 Aug 2003 15:54:42 -0000 1.3
***************
*** 4,10 ****
/**
* Send an event to the server-side (PHP) code.
! * obj_id -- the object to which the event is sent
! * event_name -- the name of the event
! * event_args -- the arguments of the event, optional
*/
function SendEvent(obj_id, event_name, event_args)
--- 4,10 ----
/**
* Send an event to the server-side (PHP) code.
! * @param obj_id string The object to which the event is sent
! * @param event_name string The name of the event
! * @param event_args string The arguments of the event, optional
*/
function SendEvent(obj_id, event_name, event_args)
***************
*** 56,60 ****
/**
* This variable is made true when the programer makes 'true'
! * the DEBUG_GOTO constant in 'const.Settings.php'
*/
var debug_GoTo = false;
--- 56,60 ----
/**
* This variable is made true when the programer makes 'true'
! * the DEBUG_GOTO constant in 'const.Settings.php'.
*/
var debug_GoTo = false;
***************
*** 62,66 ****
/**
* Submits the form of the page to the 'target' specified as parameter
! * by taking care to serialize and transmit the session vars as well
*/
function GoTo(target)
--- 62,66 ----
/**
* Submits the form of the page to the 'target' specified as parameter
! * by taking care to serialize and transmit the session vars as well.
*/
function GoTo(target)
Index: class.Session.php
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/session/class.Session.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** class.Session.php 11 Aug 2003 16:17:51 -0000 1.4
--- class.Session.php 22 Aug 2003 15:54:42 -0000 1.5
***************
*** 1,11 ****
<?php
/**
! * Used to keep session variables.
* @package session
*/
class Session
{
! var $Vars; //associated array that keeps the session vars
! var $dbVars; //associated array that keeps the DB session vars
function Session()
--- 1,15 ----
<?php
/**
! * Used to keep session (state, persistent) variables.
* @package session
*/
class Session
{
! /** Associated array that keeps the session vars. */
! var $Vars;
!
! /** Associated array that keeps the DB session vars. */
! var $dbVars;
!
function Session()
***************
*** 31,35 ****
}
! /** initialize a new session */
function init()
{
--- 35,39 ----
}
! /** Initialize a new session. */
function init()
{
***************
*** 51,56 ****
/**
! * create the table 'session' in database,
! * if such a table does not exist
*/
function create_table_session()
--- 55,60 ----
/**
! * Create the table 'session' in database,
! * if such a table does not exist.
*/
function create_table_session()
***************
*** 94,98 ****
* Helper function that explodes the string given as parameter
* and returns an associated array of var_name and var_value.
! * The format of $strVars is: var1=val1&var2=val2&...
*/
function str2arr($strVars)
--- 98,102 ----
* Helper function that explodes the string given as parameter
* and returns an associated array of var_name and var_value.
! * The format of $strVars is: <kbd>var1=val1&var2=val2&...</kbd>
*/
function str2arr($strVars)
***************
*** 112,116 ****
* Explodes the variable $sessVars
* and fills the array $this->Vars with the session variables.
! * The format of $sessVars is: var1=val1&var2=val2&...
*/
function getVars($sessVars)
--- 116,120 ----
* Explodes the variable $sessVars
* and fills the array $this->Vars with the session variables.
! * The format of $sessVars is: <kbd>var1=val1&var2=val2&...</kbd>
*/
function getVars($sessVars)
***************
*** 133,137 ****
}
! /** replace some chars that are bad for JS code */
function js_encode($str)
{
--- 137,141 ----
}
! /** Replace some chars that are bad for JS code. */
function js_encode($str)
{
***************
*** 142,149 ****
}
! /**
! * get dbVars from DB; requires
! * the table session(id,vars) in DB
! */
function getDBVars()
{
--- 146,150 ----
}
! /** Get dbVars from DB. Requires the table session(id,vars) in DB. */
function getDBVars()
{
***************
*** 165,169 ****
/**
* Explodes $phpVars and declares some PHP global vars.
! * The format of $phpVars is: var1=val1&var2=val2&...
*/
function extractPhpVars($phpVars)
--- 166,170 ----
/**
* Explodes $phpVars and declares some PHP global vars.
! * The format of $phpVars is: <kbd>var1=val1&var2=val2&...</kbd>
*/
function extractPhpVars($phpVars)
***************
*** 181,185 ****
* Adds a new variable in the session.
* The third parameter is optional and if it is true
! * then the variable is added as a DB (secure) variable
*/
function addVar($var_name, $var_value, $db =false)
--- 182,186 ----
* Adds a new variable in the session.
* The third parameter is optional and if it is true
! * then the variable is added as a DB (secure) variable.
*/
function addVar($var_name, $var_value, $db =false)
***************
*** 223,228 ****
/**
! * sets a new value for a variable
! * DB vars have priority over JS vars
*/
function setVar($var_name, $var_value)
--- 224,229 ----
/**
! * Sets a new value for a variable;
! * DB vars have priority over JS vars.
*/
function setVar($var_name, $var_value)
***************
*** 239,245 ****
/**
! * returns the value of a variable, or UNDEFINED
! * if such a variable does not exist;
! * DB vars have priority over JS vars
*/
function getVar($var_name)
--- 240,246 ----
/**
! * Returns the value of a variable, or UNDEFINED
! * if such a variable does not exist.
! * DB vars have priority over JS vars.
*/
function getVar($var_name)
***************
*** 263,267 ****
/**
* Builds and returns the variable $session_vars which is used to insert
! * the session vars inside the page as JavaScript code
*/
function to_JS()
--- 264,268 ----
/**
* Builds and returns the variable $session_vars which is used to insert
! * the session vars inside the page as JavaScript code.
*/
function to_JS()
***************
*** 281,285 ****
}
! /** save dbVars in DB */
function saveDBVars()
{
--- 282,286 ----
}
! /** Save dbVars in DB. */
function saveDBVars()
{
Index: class.Request.php
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/session/class.Request.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** class.Request.php 22 Aug 2003 06:47:20 -0000 1.3
--- class.Request.php 22 Aug 2003 15:54:42 -0000 1.4
***************
*** 11,15 ****
var $strEvent;
var $phpVars;
! var $firstTime; //if true, then this page is the first in the session
function Request()
--- 11,17 ----
var $strEvent;
var $phpVars;
!
! /** If true, then this page is the first in the session. */
! var $firstTime;
function Request()
Index: class.Event.php
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/session/class.Event.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** class.Event.php 16 Jul 2003 12:05:23 -0000 1.3
--- class.Event.php 22 Aug 2003 15:54:42 -0000 1.4
***************
*** 5,14 ****
class Event
{
! var $sourcePage; //the page that sent the event
! var $targetPage; //the page that should receive the event
! var $name; //the name of the event
! var $target; //the target box
! var $args; //array that keeps the arguments of the event
/** Constructs an event from an event string. */
--- 5,23 ----
class Event
{
! /** The page that sent the event. */
! var $sourcePage;
!
! /** The page that should receive the event. */
! var $targetPage;
! /** The name of the event. */
! var $name;
!
! /** The target webobject. */
! var $target;
!
! /** Array that keeps the arguments of the event. */
! var $args;
!
/** Constructs an event from an event string. */
***************
*** 25,29 ****
/**
* An event string has this format:
! * event=target.name(arg1=val1;arg2=val2;arg3=val3)
*/
function parse($strEvent)
--- 34,38 ----
/**
* An event string has this format:
! * <kbd>event=target.name(arg1=val1;arg2=val2;arg3=val3)</kbd>
*/
function parse($strEvent)
***************
*** 82,87 ****
/**
! * returns an array of all the arguments of the event
! * only their values
*/
function getArgs()
--- 91,96 ----
/**
! * Returns an array of all the arguments of the event,
! * only their values.
*/
function getArgs()
***************
*** 94,98 ****
}
! /** prints out the event (for debug) */
function to_text()
{
--- 103,107 ----
}
! /** Prints out the event (for debug). */
function to_text()
{
|