marc-mabe/php-enum — pull request #14 by marc-mabe (2013-09-11 10:34:13+00:00)
Title: Singleton

Each value of an enumeration exists only once

API Changes:
* PHP 5.3 is required
* instantiate using `MyEnum::get(MyEnum::MY_VALUE);`
* clear singleton instances using `MyEnum::clear();`
- This should only be used for testing or in big long running applications to free memory because it potentially break the singleton behavior
* enums are no longer cloneable
* `getConstants()` is static