Source for file Storage.php
Documentation is available at Storage.php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
* A framework for authentication and authorization in PHP applications
* LiveUser is an authentication/permission framework designed
* to be flexible and easily extendable.
* Since it is impossible to have a
* "one size fits all" it takes a container
* approach which should enable it to
* be versatile enough to meet most needs.
* LICENSE: 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 (at your option) 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,
* @category authentication
* @author Markus Wolff <wolff@21st.de>
* @author Helgi Þormar Þorbjörnsson <dufuz@php.net>
* @author Lukas Smith <smith@pooteeweet.org>
* @author Arnaud Limbourg <arnaud@php.net>
* @author Pierre-Alain Joye <pajoye@php.net>
* @author Bjoern Kraus <krausbn@php.net>
* @copyright 2002-2006 Markus Wolff
* @license http://www.gnu.org/licenses/lgpl.txt
* @version CVS: $Id: Storage.php,v 1.18 2006/03/14 13:10:04 lsmith Exp $
* @link http://pear.php.net/LiveUser
* Abstraction class for all the storage containers
* @category authentication
* @author Lukas Smith <smith@pooteeweet.org>
* @author Bjoern Kraus <krausbn@php.net>
* @copyright 2002-2006 Markus Wolff
* @license http://www.gnu.org/licenses/lgpl.txt
* @version Release: @package_version@
* @link http://pear.php.net/LiveUser
* All fields with their types
* All fields with their alias
* @param mixed configuration array
$this->stack = &PEAR_ErrorStack ::singleton ('LiveUser');
* Initialize the storage container
* @param array Array with the storage configuration
* @return bool true on success, false on failure.
function init(&$storageConf)
foreach ($keys as $key) {
if (isset ($this->$key)) {
$this->$key = & $storageConf[$key];
require_once 'LiveUser/Perm/Storage/Globals.php';
$this->tables = $GLOBALS['_LiveUser']['perm']['tables'];
$this->fields = $GLOBALS['_LiveUser']['perm']['fields'];
if (empty ($this->alias)) {
$this->alias = $GLOBALS['_LiveUser']['perm']['alias'];
* map an auth user to a perm user
* @param int $auth_user_id
* @param string $containerName
* @return array requested data or false on failure
function mapUser($auth_user_id, $containerName)
__METHOD__. ' is not implemented');
* Reads all rights of current user into a
* two-dimensional associative array, having the
* area names as the key of the 1st dimension.
* Group rights and invididual rights are being merged
* @param int perm user id
* @return array requested data or false on failure
__METHOD__. ' is not implemented');
* read the areas in which a user is an area admin
* @param int perm user id
* @return array requested data or false on failure
__METHOD__. ' is not implemented');
* Reads all the group ids in that the user is also a member of
* (all groups that are subgroups of these are also added recursively)
* @param int perm user id
* @return array requested data or false on failure
__METHOD__. ' is not implemented');
* and put them in the array
* @return array requested data or false on failure
__METHOD__. ' is not implemented');
* Read the sub groups of the new groups that are not part of the group ids
* @param array new group ids
* @return array requested data or false on failure
__METHOD__. ' is not implemented');
* Read out the rights from the userrights or grouprights table
* that imply other rights along with their level
* @param string name of the table
* @return array requested data or false on failure
__METHOD__. ' is not implemented');
* Read out the implied rights with a given level from the implied_rights table
* @param array current right ids
* @param string current level
* @return array requested data or false on failure
__METHOD__. ' is not implemented');
* store all properties in the session and return them as an array
* @param string name of the key to use inside the session
* @param array property values
* @return array containing the property values
function freeze($sessionName, $propertyValues)
$_SESSION[$sessionName]['perm'] = $propertyValues;
* Reinitializes properties
* @param string name of the key to use inside the session
&& is_array($_SESSION[$sessionName]['perm']))
? $_SESSION[$sessionName]['perm'] : array ();
* properly disconnect from resources
* @return bool true on success and false on failure
Documentation generated on Mon, 28 Jan 2008 03:30:33 -0500 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.
|