kfosoft/php-abstract-enum

PHP Abstract Enumeration

20.11 2020-11-30 19:11 UTC

This package is auto-updated.

Last update: 2024-10-29 04:36:44 UTC


README

Installation

Installation with Composer

Either run

    php composer.phar require --prefer-dist kfosoft/php-abstract-enum:"*"

or add in composer.json

    "require": {
            ...
            "kfosoft/php-abstract-enum": "*"
    }

Example

<?php
namespace app\enums;

use KFOSOFT\Domain\Enumeration\AbstractEnumeration;

/**
 * @package app\enums
 */
class UserType extends AbstractEnumeration
{
    const USER        = 1;
    const CLIENT      = 2;
    const ADMIN       = 3;
    const SUPER_ADMIN = 4;
}

Enjoy, guys!