Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 20615 программистов и 985 роботов. Сейчас ищут 938 программистов ...

Options

Вернуться к: HTML_Common2

Options

Options – Setting document-wide options.

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'

Charset parameter to use in htmlspecialchars() calls, defaults to 'ISO-8859-1'

'indent'

string used to indent HTML elements, defaults to "\11"

'linebreak'

string used to indicate linebreak, defaults to "\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.



Вернуться к: HTML_Common2

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware