idimensionz / ispl
iDimensionz Standard PHP Library
dev-master
2017-09-25 00:24 UTC
Requires
- php: ^7.0
Requires (Dev)
- codeclimate/php-test-reporter: ^0.4.4
- phake/phake: ^3.0.0
- phpunit/phpunit: ^6.3
This package is auto-updated.
Last update: 2024-11-06 09:47:25 UTC
README
iDimensionz's Standard PHP Library
Library containing custom classes.
Enum (EnumAbstract)
Class to emulate enumerated fields (i.e. fields that may only specific values). The specific values are declared as constants in the child class. The parent class provides functions for interacting with the enum:
- getValidValues(): returns an array of valid values.
- _isValidValue($value)__: returns true or false to indicate if the value is one of the valid values for this enum.
- setValue($value), getValue: Getter and setter for the field value.
- The parent class provides the ability to type-cast the child class as a string to get the value as a string.