Download the PHP package robusto/enum without Composer
On this page you can find all versions of the php package robusto/enum. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package enum
Robusto Enum!
A robust and simple way to define enumerative types in php.
Scrutinizer | Code Quality | Latest | Development | PHP | License |
![]() |
![]() |
|
|
|
|
Requirements:
- PHP 7.0+
- DBAL (only for use EnumType)
Simple Example:
Example using descriptions for the enumerative values:
Possibility of using enum with php typehint, restricting their value according to their respective values of type:
Printing description of its enum value:
public function getLanguage(): LanguageEnum
{
return $this->language;
}
$foo->setLanguage(LanguageEnum::JS());
echo $foo->getLanguage(); // Javascript
echo LanguageEnum::JS; // 5
echo get_class($foo->getLanguage()); // LanguageEnum
All versions of enum with dependencies
PHP Build Version
Package Version
The package robusto/enum contains the following files
Loading the files please wait ....