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
Fetch and build the bitwise array
- Parameters:
-
| string | Array 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:
-
| array | Array of key => values to save |
| string | Type of options to save |
| string | App |
- Returns:
- int
| static sql |
( |
$ |
bitField, |
|
|
$ |
sqlField, |
|
|
$ |
type, |
|
|
$ |
app = 'global', |
|
|
$ |
sql = 'has' |
|
) |
| [static] |
Build an SQL query bit
- Parameters:
-
| string | Field (field name as assigned by thaw) |
| string | SQL field |
| string | Type (members, groups, etc ) |
| string | App (global, forums, etc) |
| string | Type 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:
-
| int | Bitwise option |
| string | Type of options to decipher (user / groups / etc) |
| string | App |
- Returns:
- array
$options = IPSBWOptions::thawOptions( 18, 'user', 'forums' );
The documentation for this class was generated from the following file:
- admin/sources/base/core.php