IP.Board  3.3.0
IPSBWOptions Class Reference

Static Public Member Functions

static freeze ($toSave, $type, $app='global')
static sql ($bitField, $sqlField, $type, $app='global', $sql='has')
static thaw ($bitfield, $type, $app='global')

Static Protected Member Functions

static _getBitWiseArray ($type, $app)

Detailed Description

Experimental class for storing options as bitwise

Author:
Matt

Member Function Documentation

static _getBitWiseArray ( type,
app 
) [static, protected]

Fetch and build the bitwise array

Parameters:
stringArray key to return
Returns:
array
static freeze ( toSave,
type,
app = 'global' 
) [static]

Freeze options Converts an array of options array( 'key' => 0 ... ) into an int for saving in a DB field

Parameters:
arrayArray of key => values to save
stringType of options to save
stringApp
Returns:
int
static sql ( bitField,
sqlField,
type,
app = 'global',
sql = 'has' 
) [static]

Build an SQL query bit

Parameters:
stringField (field name as assigned by thaw)
stringSQL field
stringType (members, groups, etc )
stringApp (global, forums, etc)
stringType of SQL query (add/remove/has)
Returns:
string Formatted SQL field
static thaw ( bitfield,
type,
app = 'global' 
) [static]

Convert a bit field into an array of options

Parameters:
intBitwise option
stringType of options to decipher (user / groups / etc)
stringApp
Returns:
array $options = IPSBWOptions::thawOptions( 18, 'user', 'forums' );

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables