PHP Class 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
Mostrar archivo Open project: soonick/poMMo Class Usage Examples

Public Properties

Property Type Description
$_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

Public Methods

Method Description
__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

Method Details

__construct() public method

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

add() public static method

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

delete() public static method

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

get() static public method

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

getMemberIDs() public method

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

getNames() public static method

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

make() public static method

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

makeDB() static public method

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

members() public method

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

nameChange() public method

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

nameExists() public static method

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

rulesAffected() public static method

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

tally() public static method

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

validate() public static method

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

Property Details

$_group public_oe property

name of group
public $_group

$_id public_oe property

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

$_memberIDs public_oe property

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

$_name public_oe property

public $_name

$_status public_oe property

the group tally
public $_status

$_tally public_oe property

the group object
public $_tally