Sitellite Application Framework
Class Tree         Index         All Elements

Class: SessionStore

Source Location: Program_Root/Session/Store/Store.php

Class Overview


This is the base store driver package for saf.Session. Custom drivers are created by sub-classing this package.


Author(s)

Version

  • 1.0, 2002-11-09, $Id: Store.php,v 1.2 2005/07/06 15:30:56 lux Exp $

Copyright

  • Copyright (C) 2001-2003, Simian Systems Inc.

Variables

Methods


Child Classes

SessionStore_PHP
This is the base store driver package for saf.Session. Custom drivers are created by sub-classing this package.

Inherited Variables

Inherited Methods


Class Details

[line 73]
This is the base store driver package for saf.Session. Custom drivers are created by sub-classing this package.


1 <?php
2
3 $s = new SessionStore;
4
5 $s->setProperties (array (
6 'foo' => 'bar',
7 ));
8
9 if ($s->start ($id)) {
10 // connected
11
12 // set a few session variables
13 $s->set ('name', 'Joe');
14 $s->set ('age', '24');
15
16 // get the value of 'name'
17 $name =$s->get ('name');
18
19 // rename 'name'
20 $oldname = $s->set ('name', 'Jack');
21
22 // unset 'age'
23 $s->set ('age', false);
24
25 // remember these for next time
26 $s->save ();
27 } else {
28 // not connected
29 echo $s->error;
30 }
31
32 ?>




Tags:

access:  public
version:  1.0, 2002-11-09, $Id: Store.php,v 1.2 2005/07/06 15:30:56 lux Exp $
license:  http://www.sitellite.org/index/license
copyright:  Copyright (C) 2001-2003, Simian Systems Inc.
author:  John Luxford <mailto:lux@simian.ca>


[ Top ]


Class Variables

$connection =  false

[line 100]

The store connection resource, if applicable to the individual driver.



Tags:

access:  public

Type:   mixed


[ Top ]

$error =

[line 91]

The error message if an error occurs.



Tags:

access:  public

Type:   mixed


[ Top ]

$sessObj =

[line 83]

A reference to the main session object, in case it's needed by a specific handler.



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


constructor SessionStore [line 119]

SessionStore SessionStore( )

Constructor method.



Tags:

access:  public


[ Top ]

method close [line 209]

void close( )

Closes the session with the store, erasing the values for this session.



Tags:

access:  public


Overridden in child classes as:

SessionStore_PHP::close()
Closes the session with the store, erasing the values for this session.

[ Top ]

method get [line 157]

mixed get( string $name)

Retrieves a value from the session store. Returns false if the value does not exist.



Tags:

access:  public


Overridden in child classes as:

SessionStore_PHP::get()
Retrieves a value from the session store. Returns false if the value does not exist.

Parameters:

string   $name  

[ Top ]

method save [line 199]

boolean save( )

Tells the session store to save the values within it.



Tags:

access:  public


Overridden in child classes as:

SessionStore_PHP::save()
Tells the session store to save the values within it.

[ Top ]

method set [line 177]

mixed set( string $name, [mixed $value = false])

Sets a value in the session store. If the value is false, it will unset it in the store. If the value is being unset or set to a new value, then the old value is returned. If it is a new value, then the value itself will be returned.



Tags:

access:  public


Overridden in child classes as:

SessionStore_PHP::set()
Sets a value in the session store. If the value is false, it will unset it in the store. If the value is being unset or set to a new value, then the old value is returned. If it is a new value, then the value itself will be returned.

Parameters:

string   $name  
mixed   $value  

[ Top ]

method setProperties [line 129]

void setProperties( associative $properties)

Sets the properties of this object.



Tags:

access:  public


Parameters:

associative   $properties   array $properties

[ Top ]

method start [line 145]

boolean start( string $id)

Starts the session store, initializing any necessary connections, and retrieving any session values found from a previous web page request.

$id is the session identifier of the current visitor.




Tags:

access:  public


Overridden in child classes as:

SessionStore_PHP::start()
Starts the session store, initializing any necessary connections, and retrieving any session values found from a previous web page request.

Parameters:

string   $id  

[ Top ]


Copyright © 2007, SIMIAN systems Inc.
All rights reserved. Privacy policy
Documentation generated on Tue, 13 Feb 2007 17:19:39 -0600 by Sitellite AppDoc and phpDocumentor 1.2.2