Tristate Class Reference
[Tristate]
Provides tristate logic. More...
Static Public Member Functions |
|
static | get_states () |
Returns possible states as associative array
with DB vlaue as key and localized display
value as value. |
|
static | resolve ($tristate, $yes, $no, $unkown) |
Depending on $tristate returns of of the
values $yes, $no, or $unkown. |
|
Public Attributes |
|
const | NO = 'FALSE' |
const | UNKOWN = 'UNKNOWN' |
const | YES = 'TRUE' |
Detailed Description
Provides tristate logic.
- Since:
- 0.5.1
Definition at line 10 of file tristate.cls.php.
Member Function Documentation
static Tristate::get_states | ( | ) | [static] |
Returns possible states as associative array with DB vlaue as key and localized display value as value.
- Returns:
- array
Definition at line 20 of file tristate.cls.php.
static Tristate::resolve | ( | $ | tristate, | |
$ | yes, | |||
$ | no, | |||
$ | unkown | |||
) | [static] |
Depending on $tristate returns of of the values $yes, $no, or $unkown.
- Parameters:
-
string $tristate Tristate value mixed $yes Value to return if $tristate is Tristate::YES mixed $no Value to return if $tristate is Tristate::NO mixed $unknown Value to return if $tristate is Tristate::UNKOWN
- Returns:
- mixed
Definition at line 37 of file tristate.cls.php.
Member Data Documentation
const Tristate::NO = 'FALSE' |
Definition at line 12 of file tristate.cls.php.
const Tristate::UNKOWN = 'UNKNOWN' |
Definition at line 13 of file tristate.cls.php.
const Tristate::YES = 'TRUE' |
Definition at line 11 of file tristate.cls.php.
The documentation for this class was generated from the following file:
- contributions/db.tristate/lib/helpers/tristate.cls.php