| ILIAS
    Release_4_4_x_branch Revision 61816
    | 
ilBitmask is a utility class to deal with bitmask-based settings. More...
 Collaboration diagram for ilBitmask:
 Collaboration diagram for ilBitmask:| Public Member Functions | |
| __construct ($a_setting_names, $a_bitmask) | |
| Public constructor instantiating a class of type ilBitmask. | |
| get ($a_setting_name) | |
| Gets the given setting from the bitmask. | |
| set ($a_setting_name, $value) | |
| Sets the given setting from the bitmask. | |
| getBitmask () | |
| Returns the bitmask. | |
| Protected Attributes | |
| $setting_names | |
| $bitmask | |
ilBitmask is a utility class to deal with bitmask-based settings.
The concept is to instantiate an instance of the class, passing an array of setting-names and the bitmask. Then you can access the bitmasks individual settings in your class with a simple accessor. This is a stable alternative to defining the cardinality of the individual settings in a dozen setters but in one convenient place.
Definition at line 15 of file class.ilBitmask.php.
| ilBitmask::__construct | ( | $a_setting_names, | |
| $a_bitmask | |||
| ) | 
Public constructor instantiating a class of type ilBitmask.
| $a_setting_names | string[] Array of names ordered by ordinality | 
| $a_bitmask | integer Integer holding the current bitmask | 
Definition at line 31 of file class.ilBitmask.php.
| ilBitmask::get | ( | $a_setting_name | ) | 
Gets the given setting from the bitmask.
| $a_setting_name | string Name of the setting. | 
| ilException | Thrown when setting is not available. | 
Definition at line 46 of file class.ilBitmask.php.
| ilBitmask::getBitmask | ( | ) | 
Returns the bitmask.
Definition at line 110 of file class.ilBitmask.php.
References $bitmask.
| ilBitmask::set | ( | $a_setting_name, | |
| $value | |||
| ) | 
Sets the given setting from the bitmask.
| $a_setting_name | |
| $value | 
| ilException | Thrown when setting is not available. | 
Definition at line 71 of file class.ilBitmask.php.
| 
 | protected | 
Definition at line 21 of file class.ilBitmask.php.
Referenced by getBitmask().
| 
 | protected | 
Definition at line 18 of file class.ilBitmask.php.