Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]
(no description)
License: | http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file) |
File Size: | 239 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Enum:: (13 methods):
__construct()
getValue()
getKey()
__toString()
equals()
keys()
values()
toArray()
isValid()
isValidKey()
search()
__callStatic()
jsonSerialize()
__construct($value) X-Ref |
Creates a new value of some type param: mixed $value |
getValue() X-Ref |
return: mixed |
getKey() X-Ref |
Returns the enum key (i.e. the constant name). return: mixed |
__toString() X-Ref |
return: string |
equals($variable = null) X-Ref |
Determines if Enum should be considered equal with the variable passed as a parameter. Returns false if an argument is an object of different class or not an object. This method is final, for more information read https://github.com/myclabs/php-enum/issues/4 return: bool |
keys() X-Ref |
Returns the names (keys) of all constants in the Enum class return: array |
values() X-Ref |
Returns instances of the Enum class of all Enum constants return: static[] Constant name in key, Enum instance in value |
toArray() X-Ref |
Returns all possible values as an array return: array Constant name in key, constant value in value |
isValid($value) X-Ref |
Check if is valid enum value param: $value return: bool |
isValidKey($key) X-Ref |
Check if is valid enum key param: $key return: bool |
search($value) X-Ref |
Return key for value param: $value return: mixed |
__callStatic($name, $arguments) X-Ref |
Returns a value when called statically like so: MyEnum::SOME_VALUE() given SOME_VALUE is a class constant param: string $name param: array $arguments return: static |
jsonSerialize() X-Ref |
Specify data which should be serialized to JSON. This method returns data that can be serialized by json_encode() natively. return: mixed |