Ticket #680 (new Feature Request)

Opened 5 months ago

Last modified 3 months ago

Bitfield code library

Reported by: Adura Owned by: - No owner -
Priority: minor Milestone: 2.3
Component: Libraries Version: SVN HEAD
Keywords: Cc:

Description

Created a little something to handle bitfields.

An example would be:

$bitfield = new Bitfield(array('can post', 'can moderate', 'can administer'));

echo var_dump($bitfield->convert(5)); // array(2) { [0]=> string(8) "can post" [1]=> string(14) "can administer" }

echo $bitfield->convert(array('can post', 'can administer')); // 5

echo $bitfield->convert('can moderate'); // 2

Attachments

Bitfield.php (1.6 kB) - added by Adura 3 months ago.
Bitfield code library - fixed factory method

Change History

Changed 5 months ago by Adura

  • summary changed from Bitfiield code library to Bitfield code library

Changed 5 months ago by Adura

  • type changed from Other to Feature Request

Changed 3 months ago by Adura

  • milestone changed from 2.2 to 2.3

Changed 3 months ago by Adura

Bitfield code library - fixed factory method

Note: See TracTickets for help on using tickets.