konekt/common

This package is abandoned and no longer maintained. The author suggests using the konekt/enum package instead.

Common components and utils to be used across various Konekt libraries

0.1.2 2016-03-03 13:34 UTC

This package is auto-updated.

Last update: 2019-02-20 18:40:37 UTC


README

PHP Component Set

v0.1.1 - 2016-03-03

Common components to be used across various Konekt libraries

Enum

Abstract class that enables creation of PHP enums. All you have to do is extend this class and define some constants. Alternative implementation of the SplEnum class (as that is often not available on php installations)

Enum is an object with value from one of those constants (or from one of superclass if any). There is also a __default constant that enables you to create an object without passing enum value.

Credits to Marian Suflaj, http://www.php4every1.com/scripts/php-enum/