X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fclass_BaseFrameworkSystem.php;h=78cdde3f367828f3e4f7cf12e015b9b3e5e3e561;hp=01a280da02ee32b936ceec5632c492c303ae986e;hb=e09b363cfbdc093f05bde31c40a185ec87525205;hpb=6edacad98e6c986fbc6a3be661c4928c57a2334d diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 01a280da..78cdde3f 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -2714,6 +2714,23 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { // Return it return $isValid; } + + /** + * Translates boolean TRUE to 'Y' and FALSE to 'N' + * + * @param $boolean Boolean value + * @return $translated Translated boolean value + */ + public static final function translateBooleanToYesNo ($boolean) { + // Make sure it is really boolean + assert(is_bool($boolean)); + + // "Translate" it + $translated = ($boolean === TRUE) ? 'Y' : 'N'; + + // ... and return it + return $translated; + } } // [EOF]