PHPackages                             royalcms/enum - 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. royalcms/enum

ActiveLibrary

royalcms/enum
=============

The Royalcms Enum package. This class gives the ability to emulate and get enumeration data natively in PHP.

v5.0.1(6y ago)0581MITPHPPHP &gt;=5.5.9

Since Mar 9Pushed 6y ago1 watchersCompare

[ Source](https://github.com/royalcms/royalcms-enum)[ Packagist](https://packagist.org/packages/royalcms/enum)[ Docs](http://royalcms.cn)[ RSS](/packages/royalcms-enum/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (3)Used By (1)

royalcms-enum
=============

[](#royalcms-enum)

> This class gives the ability to emulate and get enumeration data natively in PHP.

- You can convert enum values easily.
- requires php&gt;=5.5.9, because array constant are used.

Getting started
---------------

[](#getting-started)

### Install

[](#install)

```
composer require royalcms/enum
```

### Example

[](#example)

Create a class for an enum data, like this:

```
