// Getter for 'output_mode' value
function getScriptOutputMode () {
- // Default is null
- $output_mode = null;
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Default is null
+ $output_mode = null;
- // Is the value set?
- if (isOutputModeSet(true)) {
- // Then use it
- $output_mode = $GLOBALS['output_mode'];
+ // Is the value set?
+ if (isOutputModeSet(true)) {
+ // Then use it
+ $output_mode = $GLOBALS['output_mode'];
+ } // END - if
+
+ // Store it in cache
+ $GLOBALS[__FUNCTION__] = $output_mode;
} // END - if
- // Return it
- return $output_mode;
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
}
// Setter for 'output_mode' value
// Should we abort here?
if (($strict === true) && ($isset === false)) {
// Output backtrace
- debug_report_bug(__FUNCTION__, __LINE__, 'Output_mode is empty.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Output mode is not set.');
} // END - if
// Return it