/** * Changes the indents used in EEH_HTML::nl. Often its convenient to change * the indentation level without actually creating a new line * * @param int $indent can be negative to decrease the indentation level * @param string $tag */ public static function indent($indent, $tag = 'none') { static $default_indentation = FALSE; if (!$default_indentation) { EEH_HTML::_set_default_indentation(); $default_indentation = TRUE; } if (!isset(EEH_HTML::$_indent[$tag])) { EEH_HTML::$_indent[$tag] = 0; } EEH_HTML::$_indent[$tag] += (int) $indent; EEH_HTML::$_indent[$tag] = EEH_HTML::$_indent[$tag] >= 0 ? EEH_HTML::$_indent[$tag] : 0; }