XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
XoopsMembershipHandler Class Reference
Inheritance diagram for XoopsMembershipHandler:
Inheritance graph

Public Member Functions

create ($isNew=true)
 
 delete (&$mship)
 
 deleteAll ($criteria=null)
 
get ($id)
 
 getCount ($criteria=null)
 
 getGroupsByUser ($uid)
 
 getObjects ($criteria=null, $id_as_key=false)
 
 getUsersByGroup ($groupid, $limit=0, $start=0)
 
 insert (&$mship)
 
- Public Member Functions inherited from XoopsObjectHandler
create ()
 
 delete (&$object)
 
get ($int_id)
 
 insert (&$object)
 
 XoopsObjectHandler (&$db)
 

Additional Inherited Members

- Public Attributes inherited from XoopsObjectHandler
 $db
 

Detailed Description

Definition at line 262 of file group.php.

Member Function Documentation

& XoopsMembershipHandler::create (   $isNew = true)

create a new membership

Parameters
bool$isNewshould the new object be set to "new"?
Returns
object XoopsMembership

Definition at line 270 of file group.php.

XoopsMembershipHandler::delete ( $mship)

delete a membership from the database

Parameters
object$mshipreference to the membership object
Returns
bool FALSE if failed

: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5

Definition at line 348 of file group.php.

References $result, and $sql.

XoopsMembershipHandler::deleteAll (   $criteria = null)

delete all memberships meeting the conditions

Parameters
object$criteriaCriteriaElement with conditions to meet
Returns
bool

Definition at line 424 of file group.php.

References $criteria, $result, and $sql.

& XoopsMembershipHandler::get (   $id)

retrieve a membership

Parameters
int$idID of the membership to get
Returns
mixed reference to the object if successful, else FALSE

Definition at line 285 of file group.php.

References $result, and $sql.

XoopsMembershipHandler::getCount (   $criteria = null)

count how many memberships meet the conditions

Parameters
object$criteriaCriteriaElement conditions to meet
Returns
int

Definition at line 404 of file group.php.

References $criteria, $result, and $sql.

XoopsMembershipHandler::getGroupsByUser (   $uid)

retrieve groups for a user

Parameters
int$uidID of the user
bool$asobjectshould the groups be returned as XoopsGroup objects? FALSE returns associative array.
Returns
array array of groups the user belongs to

Definition at line 444 of file group.php.

References $result, $ret, $sql, and $uid.

XoopsMembershipHandler::getObjects (   $criteria = null,
  $id_as_key = false 
)

retrieve memberships from the database

Parameters
object$criteriaCriteriaElement conditions to meet
bool$id_as_keyshould the ID be used as the array's key?
Returns
array array of references

Definition at line 371 of file group.php.

References $criteria, $limit, $result, $ret, $sql, and $start.

XoopsMembershipHandler::getUsersByGroup (   $groupid,
  $limit = 0,
  $start = 0 
)

retrieve users belonging to a group

Parameters
int$groupidID of the group
bool$asobjectreturn users as XoopsUser objects? FALSE will return arrays
int$limitnumber of entries to return
int$startoffset of first entry to return
Returns
array array of users belonging to the group

Definition at line 468 of file group.php.

References $limit, $result, $ret, $sql, and $start.

XoopsMembershipHandler::insert ( $mship)

inserts a membership in the database

Parameters
object$mshipreference to the membership object
Returns
bool TRUE if already in DB or successful, FALSE if failed

: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5

Definition at line 309 of file group.php.

References $result, $sql, and $uid.


The documentation for this class was generated from the following file: