PHP Класс Pommo_Groups, poMMo

==Additional Columns from group_rules== rule_id (int) Database ID/Key group_id (int) Correlating Group ID field_id (int) Correlating Field ID logic (enum) 'is','not','greater','less','true','false','is_in','not_in' value (str) Match Value
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$_group name of group
$_id array of member IDs (if group is numeric)
$_memberIDs subscriber status (0(inactive),1(active),2(pending))
$_name
$_status the group tally
$_tally the group object

Открытые методы

Метод Описание
__construct ( $groupID = NULL, $status = 1, $filter = FALSE ) ============ NON STATIC METHODS ===================
add ( $in ) returns the database ID of the added group or FALSE if failed
delete ( $id ) returns the # of deleted groups (int). 0 (false) if none.
get ( $p = [] ) returns an array of groups. Array key(s) correlates to group ID.
getMemberIDs ( $group, $status = 1, $filter = false ) returns an array of subscriber IDs
getNames ( $id = null ) returns an array of group names. Array key(s) correlates to group ID.
make ( $in = [] ) return a group object (array)
makeDB ( &$row ) return a group object (array)
members ( $p = [], $filter = ['field' => null, 'string' => null] ) returns sorted/ordered/limited member IDs -- scoped to current group member IDs
nameChange ( $id, $name ) returns success (bool)
nameExists ( $name = null ) returns (bool) true if exists, false if not
rulesAffected ( $id = [] ) Returns a count (int) of affected rules. 0 if none.
tally ( $group, $status = 1 ) returns a tally (int)
validate ( &$in ) TODO -> add validation of group array

Описание методов

__construct() публичный Метод

============ NON STATIC METHODS ===================
public __construct ( $groupID = NULL, $status = 1, $filter = FALSE )

add() публичный статический Метод

returns the database ID of the added group or FALSE if failed
public static add ( $in )

delete() публичный статический Метод

returns the # of deleted groups (int). 0 (false) if none.
public static delete ( $id )

get() статический публичный Метод

returns an array of groups. Array key(s) correlates to group ID.
static public get ( $p = [] )

getMemberIDs() публичный Метод

returns an array of subscriber IDs
public getMemberIDs ( $group, $status = 1, $filter = false )

getNames() публичный статический Метод

returns an array of group names. Array key(s) correlates to group ID.
public static getNames ( $id = null )

make() публичный статический Метод

return a group object (array)
public static make ( $in = [] )

makeDB() статический публичный Метод

return a group object (array)
static public makeDB ( &$row )

members() публичный Метод

returns sorted/ordered/limited member IDs -- scoped to current group member IDs
public members ( $p = [], $filter = ['field' => null, 'string' => null] )

nameChange() публичный Метод

returns success (bool)
public nameChange ( $id, $name )

nameExists() публичный статический Метод

returns (bool) true if exists, false if not
public static nameExists ( $name = null )

rulesAffected() публичный статический Метод

Returns a count (int) of affected rules. 0 if none.
public static rulesAffected ( $id = [] )

tally() публичный статический Метод

returns a tally (int)
public static tally ( $group, $status = 1 )

validate() публичный статический Метод

TODO -> add validation of group array
public static validate ( &$in )

Описание свойств

$_group публичное свойство

name of group
public $_group

$_id публичное свойство

array of member IDs (if group is numeric)
public $_id

$_memberIDs публичное свойство

subscriber status (0(inactive),1(active),2(pending))
public $_memberIDs

$_name публичное свойство

public $_name

$_status публичное свойство

the group tally
public $_status

$_tally публичное свойство

the group object
public $_tally