API - XOOPS 2.5.11 Beta 2
By monxoops.fr
XoopsMembershipHandler Class Reference
Inheritance diagram for XoopsMembershipHandler:
Collaboration diagram for XoopsMembershipHandler:

Public Member Functions

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

Data Fields

 $table
 
- Data Fields inherited from XoopsObjectHandler
 $db
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( XoopsDatabase  $db)

called from child classes only

Parameters
XoopsDatabase$dbreference to the XoopsDatabase object @access protected

Reimplemented from XoopsObjectHandler.

Member Function Documentation

◆ create()

create (   $isNew = true)

create a new membership

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

◆ delete()

delete ( XoopsObject  $mship)

delete a membership from the database

Parameters
XoopsObject | XoopsMembership$mshipa XoopsMembership object
Returns
bool true on success, otherwise false

Reimplemented from XoopsObjectHandler.

◆ deleteAll()

deleteAll ( CriteriaElement  $criteria = null)

delete all memberships meeting the conditions

Parameters
CriteriaElement | CriteriaCompo$criteriaCriteriaElement with conditions to meet
Returns
bool

◆ get()

get (   $id)

retrieve a membership

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

Reimplemented from XoopsObjectHandler.

◆ getCount()

getCount ( CriteriaElement  $criteria = null)

count how many memberships meet the conditions

Parameters
CriteriaElement | CriteriaCompo$criteriaCriteriaElement conditions to meet
Returns
int

◆ getGroupsByUser()

getGroupsByUser (   $uid)

retrieve groups for a user

Parameters
int$uidID of the user

◆ getObjects()

getObjects ( CriteriaElement  $criteria = null,
  $id_as_key = false 
)

retrieve memberships from the database

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

◆ getUsersByGroup()

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

retrieve users belonging to a group

Parameters
int$groupidID of the group
int$limitnumber of entries to return
int$startoffset of first entry to return

◆ insert()

insert ( XoopsObject  $mship)

inserts a membership in the database

Parameters
XoopsObject | XoopsMembership$mshipa XoopsMembership object
Returns
bool true on success, otherwise false

Reimplemented from XoopsObjectHandler.

Here is the call graph for this function:

Field Documentation

◆ $table

$table

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