apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: Damblan_Karma

Source Location: /pearweb-1.1.5/include/Damblan/Karma.php

Class Overview


Class to manage the PEAR Karma System


Author(s):

Version:

  • $Revision: 1.23 $

Methods


Inherited Variables

Inherited Methods


Class Details

[line 31]
Class to manage the PEAR Karma System

This system makes it not only possible to provide a fully developed permission system, but it also allows us to set up a php.net-wide single-sign-on system some time in the future.

  • Version: $Revision: 1.23 $
  • Author: Martin Jansen <mj@php.net>


[ Top ]


Method Detail

Damblan_Karma (Constructor)   [line 41]

Damblan_Karma Damblan_Karma( object Instance &$dbh)

Constructor
  • Access: public

Parameters:

object Instance   &$dbh     of PEAR::DB

[ Top ]

get   [line 176]

array get( string $user)

Get karma for given user
  • Access: public

Parameters:

string   $user     Name of the user

[ Top ]

getLevels   [line 202]

array getLevels( )

Get all available karma levels
  • Return: Nested array containing the name of each leven and the number of occurrences of this level.
  • Access: public

[ Top ]

getUsers   [line 189]

array getUsers( string $level)

Get all users with given karma level
  • Access: public

Parameters:

string   $level     Level

[ Top ]

grant   [line 118]

boolean grant( string $user, string $level)

Grant karma for $level to the given $user
  • Access: public

Parameters:

string   $user     Handle of the user
string   $level     Level

[ Top ]

has   [line 57]

boolean has( string $user, string $level)

Determine if the given user has karma for the given $level

The given level is either a concrete karma level or an alias that will be mapped to a karma group in this method.

  • Access: public

Parameters:

string   $user     Username
string   $level     Level

[ Top ]

remove   [line 152]

boolean remove( string $user, string $level)

Remove karma $level for the given $user
  • Access: public

Parameters:

string   $user     Handle of the user
string   $level     Level

[ Top ]


Documentation generated on Sat, 06 Jan 2007 00:32:03 -0500 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.