Archive for October, 2013

Flags for PHP

In my last post I wrote about the enumerated type (Enum) for PHP. In C# an Enum can have multiple values when it has the [Flags] attribute. A flags enum can be seen as a bitwise mask which can be used to combine boolean properties of an entity into one single integer property. This might come in handy when filtering on these properties. In this article I show my implementation for a flags enum in PHP and demonstrate the use of it in an example.

Read the rest of this entry »

1 Comment