Via Composer
$ composer require teabugger/enum
use Teabugger/Enum;
class MyEnum extends Enum
{
public const FOO = 'foo';
public const BAR = 'bar';
}
$foo = new MyEnum(MyEnum::FOO);
// (string) $foo === 'foo';
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email kolesnik.teabugger@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.