PHPackages                             jgswift/kenum - 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. jgswift/kenum

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

jgswift/kenum
=============

PHP 5.5+ enumerator pattern implementation

0.1.1(11y ago)23823MITPHPPHP &gt;=5.5

Since Sep 11Pushed 11y ago1 watchersCompare

[ Source](https://github.com/jgswift/kenum)[ Packagist](https://packagist.org/packages/jgswift/kenum)[ RSS](/packages/jgswift-kenum/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (3)

kenum
=====

[](#kenum)

PHP 5.5+ enumerator pattern implementation

[![Build Status](https://camo.githubusercontent.com/406cff77f51d624d1196886c193b12ca5ceea242bd7d9d6e3f3d177a13a7dd71/68747470733a2f2f7472617669732d63692e6f72672f6a6773776966742f6b656e756d2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/jgswift/kenum)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1de2961e977b449207862ebd5d3357d6fdbb01da6446c5f70edbbbf2d681fee3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6773776966742f6b656e756d2f6261646765732f7175616c6974792d73636f72652e706e673f733d36343261346438303765376637316430616336623937383164343062386266343761386135343765)](https://scrutinizer-ci.com/g/jgswift/kenum/)[![Latest Stable Version](https://camo.githubusercontent.com/1c99d0db40bb5595a6911ab966176b6f958eab8a218da5a2c81838fa835fe1af/68747470733a2f2f706f7365722e707567782e6f72672f6a6773776966742f6b66696c74722f762f737461626c652e737667)](https://packagist.org/packages/jgswift/kfiltr)[![License](https://camo.githubusercontent.com/c0788a86448802e07ae5d9603c169597cd8dcccb8eea1a9e4e9a9c4bfb753e68/68747470733a2f2f706f7365722e707567782e6f72672f6a6773776966742f6b66696c74722f6c6963656e73652e737667)](https://packagist.org/packages/jgswift/kfiltr)[![Coverage Status](https://camo.githubusercontent.com/592ba8942390b1c13a77bc0ff4b95c2a8416b232b9e4d4d5df22942ed9ce69d2/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6a6773776966742f6b66696c74722f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/jgswift/kfiltr?branch=master)

Description
-----------

[](#description)

Kenum is a simple component to provide enum behavior using constants.
Both conventional enums and bitwise enums are included in this package.

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

[](#installation)

Install via cli using [composer](https://getcomposer.org/):

```
php composer.phar require jgswift/kenum:0.1.*
```

Install via composer.json using [composer](https://getcomposer.org/):

```
{
    "require": {
        "jgswift/kenum": "0.1.*"
    }
}
```

Dependency
----------

[](#dependency)

- php 5.5+

Usage
-----

[](#usage)

### Default Base

[](#default-base)

The following is a base Kenum minimal example

```
