PHPackages                             fpoirotte/enum-trait - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fpoirotte/enum-trait

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fpoirotte/enum-trait
====================

Enumeration type for PHP using traits

v0.1.4(9y ago)43.7kMITPHPPHP &gt;=5.4

Since Jun 11Pushed 7y ago2 watchersCompare

[ Source](https://github.com/fpoirotte/EnumTrait)[ Packagist](https://packagist.org/packages/fpoirotte/enum-trait)[ Docs](https://github.com/fpoirotte/EnumTrait)[ RSS](/packages/fpoirotte-enum-trait/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (6)Used By (0)

Enumeration type for PHP
========================

[](#enumeration-type-for-php)

This component provides an actual enumeration type for PHP.

Installation
------------

[](#installation)

This component relies on [Composer](https://getcomposer.org/)for its installation.

To use the Enum Trait in your project, just add a requirement on the package:

```
$ php composer.php require fpoirotte/enum-trait
```

Usage
-----

[](#usage)

Use the following snippet to declare a new enumeration:

```
