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

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

xakepehok/enum-helper
=====================

Enum Helper with switch-case alternative and more

0.1.3(2mo ago)110.1k↑150%11BSD-3-ClausePHPPHP &gt;=7.1.0

Since Jul 31Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/XAKEPEHOK/EnumHelper)[ Packagist](https://packagist.org/packages/xakepehok/enum-helper)[ RSS](/packages/xakepehok-enum-helper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (11)

EnumHelper
==========

[](#enumhelper)

`\XAKEPEHOK\EnumHelper\EnumHelper` - helper, that can help you work with enum-values (Value-objects) with few helpful functions, such as switch-case, guard invalid value, get all values or don't forget use all enum values as some array keys

Usage
-----

[](#usage)

Define you enum class, for example, define ValueObject class `Status` (ValueObject is not necessary, you can not define constructor and getter, and use your class as simple helper, but much cases it very useful)

```
