PHPackages                             ulrack/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ulrack/enum

Abandoned → [grizz-it/enum](/?search=grizz-it%2Fenum)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

ulrack/enum
===========

Enum objects for Ulrack.

1.0.2(6y ago)12401MITPHPPHP ^7.2

Since Apr 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ulrack/enum)[ Packagist](https://packagist.org/packages/ulrack/enum)[ RSS](/packages/ulrack-enum/feed)WikiDiscussions master Synced 5d ago

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

DEPRECATION NOTICE: this package has been moved and improved at [grizz-it/enum](https://github.com/grizz-it/enum)
=================================================================================================================

[](#deprecation-notice-this-package-has-been-moved-and-improved-at-grizz-itenum)

[![Build Status](https://camo.githubusercontent.com/a0b9260e35944016c8c8fd0c5b9d3a6a51a3bff81a83dab2065369ae102d00fe/68747470733a2f2f7472617669732d63692e636f6d2f756c7261636b2f656e756d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/ulrack/enum)

Ulrack Enum
===========

[](#ulrack-enum)

Ulrack Enum is an implementation of enumerable objects for PHP. It uses two interpreter hooks to allow type-hinting and simply retrieving the value.

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

[](#installation)

To install the package run the following command:

```
composer require ulrack/enum

```

Usage
-----

[](#usage)

In order to create an enumerable, create a new class which extends `Ulrack\Enum\Enum`. Then add all the options as constants in the newly created class. Optionally it is possible to define the callable methods in a doc-block above the class definition.

An implementation of the enumerable would look like the following:

```
