kfosoft/php-abstract-enum

PHP Abstract Enumeration

20.11 2020-11-30 19:11 UTC

This package is auto-updated.

Last update: 2024-11-29 04:50:49 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!