HTML_Common2 provides static HTML_Common2::setOption() and HTML_Common2::getOption() methods for defining the document-wide configuration. Predefined options in HTML_Common2 are:
'charset''ISO-8859-1'
'indent'"\11"
'linebreak'"\12"
It is suggested that child classes of HTML_Common2 use the above parameters when generating HTML.
Note that setOption() and getOption() allow any option names so packages depending on HTML_Common2 may add their own configuration:
<?php
HTML_Common2::setOption('my_option_name', 'My option value');
// ...
if (HTML_Common2::getOption('my_option_name')) {
// do something
}
?>
getOption() will return NULL for an unknown option name, it will return an array of all options and their values if option name is omitted.