Go to the source code of this file.
Functions | |
if(!isset($html)) | _array_sort_by_prio (&$a) |
_cmp_prio ($a, $b) | |
& | body () |
body_append ($c) | |
elem ($tag) | |
elem_add_class (&$elem, $c) | |
elem_append (&$elem, $c) | |
elem_attr (&$elem) | |
elem_classes ($elem) | |
elem_css (&$elem) | |
elem_finalize ($elem) | |
elem_has_class ($elem, $c) | |
elem_remove_attr (&$elem, $a) | |
elem_remove_class (&$elem, $c) | |
elem_tag ($elem) | |
elem_val (&$elem) | |
html_add_alternate ($type, $url, $title) | |
html_add_css ($url, $prio=5, $media= '') | |
html_add_css_inline ($rule, $prio=5) | |
html_add_head_inline ($def, $prio=5) | |
html_add_body_inline ($def, $prio=5) | |
html_add_js ($url, $prio=5) | |
html_add_js_inline ($code, $prio=5, $reason= '') | |
html_add_js_var ($key, $val) | |
html_css ($prop) | |
html_disable_caching ($reason= '') | |
html_favicon () | |
html_finalize (&$cache=false) | |
html_flush () | |
html_title () | |
Variables | |
$single_tags = array('br', 'hr', 'img', 'input', 'link', 'meta', 'param') |
if (!isset($html)) _array_sort_by_prio | ( | &$ | a | ) |
helper function for sorting an array of arrays by key 'prio'
array | &$a reference to an array |
Definition at line 27 of file html.inc.php.
_cmp_prio | ( | $ | a, | |
$ | b | |||
) |
helper function for _array_sort_prio()
array | $a array to compare | |
array | $b array to compare |
Definition at line 42 of file html.inc.php.
& body | ( | ) |
get a reference to the body element
Definition at line 56 of file html.inc.php.
body_append | ( | $ | c | ) |
helper function for appending content to the body element
mixed | $c content (can be either a string or another element) |
Definition at line 68 of file html.inc.php.
elem | ( | $ | tag | ) |
create a element
string | $tag element tag |
Definition at line 81 of file html.inc.php.
elem_add_class | ( | &$ | elem, | |
$ | c | |||
) |
add a class to an element
array | &$elem reference to an element | |
string | $c class |
Definition at line 93 of file html.inc.php.
elem_append | ( | &$ | elem, | |
$ | c | |||
) |
append content to an element
this function is similar to elem_val().
array | &$elem reference to an element | |
mixed | $c content (can be either a string or another element) |
Definition at line 110 of file html.inc.php.
elem_attr | ( | &$ | elem | ) |
get or set an attribute in an element
array | &$elem reference to an element | |
string | attribute name | |
mixed | attribute value (to set it) |
Definition at line 137 of file html.inc.php.
elem_classes | ( | $ | elem | ) |
get the element's classes in an array
array | $elem element |
Definition at line 157 of file html.inc.php.
elem_css | ( | &$ | elem | ) |
get or set a css property in an element
array | &$elem reference to an element | |
string | css property name | |
mixed | css property value (to set it; empty string to clear it) |
Definition at line 174 of file html.inc.php.
elem_finalize | ( | $ | elem | ) |
turn an element into a html string
array | $elem element |
Definition at line 202 of file html.inc.php.
elem_has_class | ( | $ | elem, | |
$ | c | |||
) |
check if an element is of a certain class
array | $elem element | |
string | $c class to check |
Definition at line 297 of file html.inc.php.
elem_remove_attr | ( | &$ | elem, | |
$ | a | |||
) |
remove an attribute from an element
array | &$elem reference to an element | |
string | $a attribute name |
Definition at line 313 of file html.inc.php.
elem_remove_class | ( | &$ | elem, | |
$ | c | |||
) |
remove a class from an element
array | &$elem reference to an element | |
string | $c class |
Definition at line 325 of file html.inc.php.
elem_tag | ( | $ | elem | ) |
get the element's tag
the tag is always returned in lowercase characters.
array | $elem element |
Definition at line 342 of file html.inc.php.
elem_val | ( | &$ | elem | ) |
get or set an element's content
this function is similar to elem_append().
array | &$elem reference to an element | |
mixed | $c content (to set it, can be either a string or another element) |
Definition at line 359 of file html.inc.php.
html_add_alternate | ( | $ | type, | |
$ | url, | |||
$ | title | |||
) |
add a link-alternate element to the html header
string | $type type attribute | |
string | $url url attribute (url-encoded if necessary) | |
string | $title title attribute |
Definition at line 380 of file html.inc.php.
html_add_body_inline | ( | $ | def, | |
$ | prio = 5 | |||
) |
add body definitions to the html body
string | $def heade definition | |
int | $prio when to insert code (0 - very early to 9 - late) |
Definition at line 443 of file html.inc.php.
html_add_css | ( | $ | url, | |
$ | prio = 5 , |
|||
$ | media = '' | |||
) |
add a reference to a css file to the html header
string | $url url attribute (url-encoded if necessary) | |
int | $prio when to insert reference (0 - very early to 9 - late) | |
string | $media media attribute (optional) |
Definition at line 397 of file html.inc.php.
html_add_css_inline | ( | $ | rule, | |
$ | prio = 5 | |||
) |
add a css rule to the html header
string | $rule css rule | |
int | $prio when to insert code (0 - very early to 9 - late) |
Definition at line 413 of file html.inc.php.
html_add_head_inline | ( | $ | def, | |
$ | prio = 5 | |||
) |
add head definitions to the html header
string | $def heade definition | |
int | $prio when to insert code (0 - very early to 9 - late) |
Definition at line 428 of file html.inc.php.
html_add_js | ( | $ | url, | |
$ | prio = 5 | |||
) |
add a reference to a javascript file to the html header
duplicate references will be removed from the output.
string | $url url attribute (url-encoded if necessary) | |
int | $prio when to insert reference (0 - very early to 9 - late) |
Definition at line 458 of file html.inc.php.
html_add_js_inline | ( | $ | code, | |
$ | prio = 5 , |
|||
$ | reason = '' | |||
) |
add javascript code to the html header
string | $code javscript code | |
int | $prio when to insert code (0 - very early to 9 - late) | |
string | $reason (e.g. your module) (optional) |
Definition at line 475 of file html.inc.php.
html_add_js_var | ( | $ | key, | |
$ | val | |||
) |
set a variable in the javascript output
string | $key variable or object the value will be stored) | |
mixed | $val value |
Definition at line 491 of file html.inc.php.
html_css | ( | $ | prop | ) |
get or set a css property in the html element
string | $prop css property name | |
mixed | css property value (to set it; empty string to clear it) |
Definition at line 507 of file html.inc.php.
html_disable_caching | ( | $ | reason = '' |
) |
disable caching of output
can be used for modules that need the php to be executed every time.
string | $reason (e.g. your module) |
Definition at line 536 of file html.inc.php.
html_favicon | ( | ) |
get or set favicon
string | url (to set it, url-encoded if necessary) |
Definition at line 551 of file html.inc.php.
html_finalize | ( | &$ | cache = false |
) |
turn the page into a html string
bool | &$cache is output cachable (will only modified if $cache is true before) |
Definition at line 573 of file html.inc.php.
html_flush | ( | ) |
reset the html output
Definition at line 709 of file html.inc.php.
html_title | ( | ) |
$single_tags = array('br', 'hr', 'img', 'input', 'link', 'meta', 'param') |
Definition at line 15 of file html.inc.php.