Sitellite Application Framework
Class Tree         Index         All Elements

Class: SessionSource

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

Class Overview


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


Author(s)

Version

  • 1.2, 2003-04-23, $Id: Source.php,v 1.4 2005/09/23 00:03:03 lux Exp $

Copyright

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

Variables

Methods


Child Classes

SessionSource_Database
This is the Database source driver package for saf.Session.

Inherited Variables

Inherited Methods


Class Details

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

New in 1.2:

  • Added the getRole(), getTeam(), and isDisabled() methods.
New in 1.4:
  • Added getActive(), session_user_get_active(), session_user_get_email(), and session_user_is_unique()

1 <?php
2
3 $s = new SessionSource;
4
5 $s->setProperties (array (
6 'foo' => 'bar',
7 ));
8
9 if ($s->authorize ($user, $pass, $id)) {
10 // in
11 } else {
12 // out
13 }
14
15 ? >




Tags:

access:  public
version:  1.2, 2003-04-23, $Id: Source.php,v 1.4 2005/09/23 00:03:03 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

$error =

[line 90]

The error message if an error occurs.



Tags:

access:  public

Type:   mixed


[ Top ]

$map = array ()

[line 98]

Source fields to map to the specified fields.



Tags:

access:  public

Type:   mixed


[ Top ]

$readOnly =  false

[line 115]

If this is set to true, the session source is considered "read-only" and can't be modified via Sitellite's user administration capabilities.



Tags:

access:  public

Type:   mixed


[ Top ]

$resultObj =

[line 82]

An object containing all of the values returned from the data source regarding the user.



Tags:

access:  public

Type:   mixed


[ Top ]

$sessObj =

[line 73]

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



Tags:

access:  public

Type:   mixed


[ Top ]

$set = array ()

[line 106]

User values to set automatically to the specified values.



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


constructor SessionSource [line 123]

SessionSource SessionSource( )

Constructor method.



Tags:

access:  public


[ Top ]

method add [line 245]

void add( mixed $data)

Adds a new user.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::add()
Adds a new user.

[ Top ]

method authorize [line 161]

boolean authorize( string $username, string $password, string $id)

Authorizes the user against the data source.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::authorize()
Authorizes the user against the database.

Parameters:

string   $username  
string   $password  
string   $id  

[ Top ]

method close [line 170]

void close( )

Closes the session with the source.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::close()
Closes the session with the source. In this case, explicitly removes the user's session info from the database.

[ Top ]

method delete [line 263]

void delete( mixed $user)

Removes the specified user.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::delete()
Removes the specified user.

[ Top ]

method getActive [line 283]

void getActive( )

Retrieves the total number of active (ie. currently logged in) users.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::getActive()
Retrieves the total number of active (ie. currently logged in) users.

[ Top ]

method getList [line 292]

void getList( mixed $offset, mixed $limit, mixed $order, mixed $ascdesc, mixed $role, mixed $team, mixed $name)

Retrieves a list of users.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::getList()
Retrieves a list of users.

[ Top ]

method getRole [line 179]

void getRole( )

Returns the role of the current user.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::getRole()
Returns the role of the current user.

[ Top ]

method getTeam [line 188]

void getTeam( )

Returns the team of the current user.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::getTeam()
Returns the team of the current user.

[ Top ]

method getTeams [line 198]

void getTeams( )

Returns the list of teams whose documents are accessible by the current user.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::getTeams()
Returns the list of teams whose documents are accessible by the current user.

[ Top ]

method getTotal [line 274]

void getTotal( mixed $role, mixed $team, mixed $public)

Retrieves the total number of users. $role and $team allow you to retrieve a total for specific roles and teams. $public allows you to specify whether to limit it to public users or not.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::getTotal()
Retrieves the total number of users. $role and $team allow you to retrieve a total for specific roles and teams.

[ Top ]

method getUser [line 218]

void getUser( mixed $user)

Retrieves a user by their username. Returns all of the user's data as an object.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::getUser()
Retrieves a user by their username.

[ Top ]

method getUserByEmail [line 227]

void getUserByEmail( mixed $email)

Retrieves a user by their email address. Returns just the username.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::getUserByEmail()
Retrieves a user by their email address.

[ Top ]

method isDisabled [line 208]

void isDisabled( )

Returns the whether or not the current user account is disabled.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::isDisabled()
Returns the whether or not the current user account is disabled.

[ Top ]

method isValidKey [line 236]

void isValidKey( mixed $user, mixed $key)

Determines whether the specified verification key is valid.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::isValidKey()
Determines whether the specified verification key is valid.

[ Top ]

method setProperties [line 133]

void setProperties( associative $properties)

Sets the properties of this object.



Tags:

access:  public


Parameters:

associative   $properties   array $properties

[ Top ]

method update [line 254]

void update( mixed $data, mixed $user)

Updates the data of the specified user.



Tags:

access:  public


Overridden in child classes as:

SessionSource_Database::update()
Updates the data of the specified user.

[ Top ]


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