PHP Class Pommo_Fields, poMMo

Show file Open project: soonick/poMMo Class Usage Examples

Public Methods

Method Description
add ( &$in ) returns the database ID of the added field or FALSE if failed
delete ( &$id ) returns the # of deleted fields (int). 0 (false) if none.
get ( $p = [] ) returns an array of fields. Array key(s) correlates to field key.
getByType ( $type ) returns an array of field IDs
getNames ( $id = null ) returns an array of field names. Array key(s) correlates to field ID.
make ( $in = [] ) return a field (array)
makeDB ( $row ) return a field (array)
optionAdd ( &$field, $value ) returns field options (array), or false (bool)
optionDel ( &$field, &$value ) returns field options (array), or false (bool)
subscribersAffected ( $id = [], $val = null ) returns an (array) of subscriber IDs.
update ( &$in ) returns success (bool)
validate ( &$in ) returns true if field ($in) is valid, false if not

Method Details

add() static public method

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

delete() public method

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

get() static public method

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

getByType() public static method

returns an array of field IDs
public static getByType ( $type )

getNames() public method

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

make() static public method

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

makeDB() static public method

return a field (array)
static public makeDB ( $row )

optionAdd() public method

returns field options (array), or false (bool)
public optionAdd ( &$field, $value )

optionDel() public method

returns field options (array), or false (bool)
public optionDel ( &$field, &$value )

subscribersAffected() public method

returns an (array) of subscriber IDs.
public subscribersAffected ( $id = [], $val = null )

update() public method

returns success (bool)
public update ( &$in )

validate() static public method

returns true if field ($in) is valid, false if not
static public validate ( &$in )