A class containing a set of data transformations for core data types.
More...
|
static | date ($date) |
| Translate a unix timestamp into a date string.
|
|
static | datetime ($datetime) |
| Translate a unix timestamp into a datetime string.
|
|
static | percentage (float $value) |
| Translate a float value which should be between 0.0 and 1.0 into percentage.
|
|
static | user (int $userid) |
| Translate a userid into the standard user format for exports.
|
|
static | yesno ($value) |
| Translate a bool or int (0/1) value into a translated yes/no string.
|
|
A class containing a set of data transformations for core data types.
- Copyright
- 2018 Andrew Nicols andre.nosp@m.w@ni.nosp@m.cols..nosp@m.co.u.nosp@m.k
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ date()
static core_privacy\local\request\transform::date |
( |
| $date | ) |
|
|
static |
Translate a unix timestamp into a date string.
- Parameters
-
int | $date | the unixtimestamp to translate. |
- Return values
-
string | The translated string. |
◆ datetime()
static core_privacy\local\request\transform::datetime |
( |
| $datetime | ) |
|
|
static |
Translate a unix timestamp into a datetime string.
- Parameters
-
int | $datetime | the unixtimestamp to translate. |
- Return values
-
string | The translated string. |
◆ percentage()
static core_privacy\local\request\transform::percentage |
( |
float | $value | ) |
|
|
static |
Translate a float value which should be between 0.0 and 1.0 into percentage.
- Parameters
-
float | $value | The value between 0.0 and 1.0. |
- Return values
-
◆ user()
static core_privacy\local\request\transform::user |
( |
int | $userid | ) |
|
|
static |
Translate a userid into the standard user format for exports.
We have not determined if we will do this or not, but we provide the functionality and encourgae people to use it so that it can be retrospectively fitted if required.
- Parameters
-
int | $userid | the userid to translate |
- Return values
-
◆ yesno()
static core_privacy\local\request\transform::yesno |
( |
| $value | ) |
|
|
static |
Translate a bool or int (0/1) value into a translated yes/no string.
- Parameters
-
bool | $value | The value to translate |
- Return values
-
The documentation for this class was generated from the following file:
- privacy/classes/local/request/transform.php