kfosoft / php-abstract-enum
PHP Abstract Enumeration
Installs: 2 505
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.4.0
- ext-json: *
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!