Public Member Functions | |
| __construct ($flags=null, $value=null) | |
| __set ($bit, $on) | |
| __get ($bit) | |
| __isset ($flag) | |
| __tostring () | |
Protected Attributes | |
| $flags = array() | |
| $full = 0 | |
| $value = 0 | |
Class to wrap around bitmap field functionality
Definition at line 10 of file bitmask.php.
| Bitmask::__construct | ( | $ | flags = null, |
|
| $ | value = null | |||
| ) |
Constructor. Takes an optional array parameter of bit flags to mask on.
| array | $flags An array of flag names | |
| integer | $value (optional) a combined bitmask value |
Definition at line 23 of file bitmask.php.
| Bitmask::__get | ( | $ | bit | ) |
Magic getter method for flag status
| bit | integer representing the mask bit to test |
Definition at line 128 of file bitmask.php.
| Bitmask::__isset | ( | $ | flag | ) |
Magic check-whether-flag-exists method
| flag | string of flag name |
Definition at line 150 of file bitmask.php.
| Bitmask::__set | ( | $ | bit, | |
| $ | on | |||
| ) |
Magic setter method for flag values.
| bit | integer representing the mask bit | |
| on | on or off? |
Definition at line 61 of file bitmask.php.
Referenced by __construct().
1.7.1