Remove duplicate code
Add ENUM base class

The enum base class allows the definition and usage of enums in PHP. It is inspired by SplEnum, but offers a nicer syntax: MyEnum::SOME_VALUE(). Unlike constants the enum powers IDE autocompletion.