api.lib.php File Reference

XHTML convenience API functions. More...

Go to the source code of this file.

Functions

 ax_raw ($content)
 Create a new raw content node.
 ax_fragment ($children=null)
 Create a new fragment node.
 ax_sprintf ($format, $values)
 Format a text node using a format specifier and supplied values.
 ax_em ($content, $attributes=null)
 Create an AnewtXHTMLEmphasis element.
 ax_strong ($content, $attributes=null)
 Create an AnewtXHTMLStrong element.
 ax_dfn ($content, $attributes=null)
 Create an AnewtXHTMLDefinition element.
 ax_code ($content, $attributes=null)
 Create an AnewtXHTMLCode element.
 ax_sample ($content, $attributes=null)
 Create an AnewtXHTMLSample element.
 ax_kbd ($content, $attributes=null)
 Create an AnewtXHTMLKeyboard element.
 ax_var ($content, $attributes=null)
 Create an AnewtXHTMLVariable element.
 ax_cite ($content, $attributes=null)
 Create an AnewtXHTMLCitation element.
 ax_abbr ($content, $title, $attributes=null)
 Create an AnewtXHTMLAbbreviation element.
 ax_acronym ($content, $title, $attributes=null)
 Create an AnewtXHTMLAcronym element.
 ax_blockquote ($content, $attributes=null)
 Create an AnewtXHTMLBlockQuote element.
 ax_q ($content, $attributes=null)
 Create an AnewtXHTMLQuote element.
 ax_sub ($content, $attributes=null)
 Create an AnewtXHTMLSubscript element.
 ax_sup ($content, $attributes=null)
 Create an AnewtXHTMLSuperscript element.
 ax_p ($content, $attributes=null)
 Create an AnewtXHTMLParagraph element.
 ax_p_class ($content, $class, $attributes=null)
 Create an AnewtXHTMLParagraph element with a class.
 ax_br ($attributes=null)
 Create an AnewtXHTMLBreak element.
 ax_pre ($content, $attributes=null)
 Create an AnewtXHTMLPreformatted element.
 ax_ins ($content, $attributes=null)
 Create an AnewtXHTMLInsertion element.
 ax_del ($content, $attributes=null)
 Create an AnewtXHTMLDeletion element.
 ax_h1 ($content, $attributes=null)
 Create an AnewtXHTMLHeader1 element.
 ax_h2 ($content, $attributes=null)
 Create an AnewtXHTMLHeader2 element.
 ax_h3 ($content, $attributes=null)
 Create an AnewtXHTMLHeader3 element.
 ax_h4 ($content, $attributes=null)
 Create an AnewtXHTMLHeader4 element.
 ax_h5 ($content, $attributes=null)
 Create an AnewtXHTMLHeader5 element.
 ax_h6 ($content, $attributes=null)
 Create an AnewtXHTMLHeader6 element.
 ax_ul ($attributes=null)
 Create an AnewtXHTMLUnorderedList element.
 ax_ul_items ($items, $attributes=null)
 Create an AnewtXHTMLUnorderedList element with items.
 ax_ol ($attributes=null)
 Create an AnewtXHTMLOrderedList element.
 ax_ol_items ($items, $attributes=null)
 Create an AnewtXHTMLOrderedList element with items.
 ax_li ($content, $attributes=null)
 Create an AnewtXHTMLListItem element.
 ax_li_class ($content, $class, $attributes=null)
 Create an AnewtXHTMLListItem element with a class.
 ax_dl ($attributes=null)
 Create an AnewtXHTMLDefinitionList element.
 ax_dl_items ($items, $attributes=null)
 Create an AnewtXHTMLDefinitionList element with items.
 ax_dt ($content, $attributes=null)
 Create an AnewtXHTMLDefinitionTerm element.
 ax_dd ($content, $attributes=null)
 Create an AnewtXHTMLDefinitionDescription element.
 ax_div ($content, $attributes=null)
 Create an AnewtXHTMLDiv element.
 ax_div_id ($content, $id, $attributes=null)
 Create an AnewtXHTMLDiv element with an id.
 ax_div_class ($content, $class, $attributes=null)
 Create an AnewtXHTMLDiv element with a class.
 ax_div_class_id ($content, $class, $id, $attributes=null)
 Create an AnewtXHTMLDiv element with a class and id.
 ax_span ($content, $attributes=null)
 Create an AnewtXHTMLSpan element.
 ax_span_id ($content, $id, $attributes=null)
 Create an AnewtXHTMLSpan element with an id.
 ax_span_class ($content, $class, $attributes=null)
 Create an AnewtXHTMLSpan element with a class.
 ax_span_class_id ($content, $class, $id, $attributes=null)
 Create an AnewtXHTMLSpan element with a class and id.
 ax_a ($content, $attributes=null)
 Create an AnewtXHTMLAnchor element.
 ax_a_href ($content, $href, $attributes=null)
 Create an AnewtXHTMLAnchor element with a href attribute.
 ax_a_href_rel ($content, $href, $rel, $attributes=null)
 Create an AnewtXHTMLAnchor element with href and rel attributes.
 ax_a_href_title ($content, $href, $title, $attributes=null)
 Create an AnewtXHTMLAnchor element with href and title attributes.
 ax_link ($attributes=null)
 Create an AnewtXHTMLLink element.
 ax_link_rss ($href, $title, $attributes=null)
 Create an AnewtXHTMLLink element for RSS feeds.
 ax_link_favicon ($href, $attributes=null)
 Create an AnewtXHTMLLink element for favicons.
 ax_base ($attributes=null)
 Create an AnewtXHTMLBase element.
 ax_img ($src, $attributes=null)
 Create an image element.
 ax_img_src ($src, $attributes=null)
 Create an image element.
 ax_img_src_alt ($src, $alt, $attributes=null)
 Create an image element with an alt attribute.
 ax_img_src_alt_title ($src, $alt, $title, $attributes=null)
 Create an image element with alt and title attributes.
 ax_tt ($content, $attributes=null)
 Create an AnewtXHTMLTeletype element.
 ax_i ($content, $attributes=null)
 Create an AnewtXHTMLItalic element.
 ax_b ($content, $attributes=null)
 Create an AnewtXHTMLBold element.
 ax_big ($content, $attributes=null)
 Create an AnewtXHTMLBig element.
 ax_small ($content, $attributes=null)
 Create an AnewtXHTMLSmall element.
 ax_strike ($content, $attributes=null)
 Create an AnewtXHTMLStrike element.
 ax_u ($content, $attributes=null)
 Create an AnewtXHTMLUnderline element.
 ax_stylesheet ($content, $attributes=null)
 Create an AnewtXHTMLStyle element.
 ax_stylesheet_href ($href, $attributes=null)
 Create an AnewtXHTMLStyle element with an href attribute.
 ax_stylesheet_href_media ($href, $media, $attributes=null)
 Create an AnewtXHTMLStyle element with href and media attributes.
 ax_script ($content, $attributes=null)
 Create an AnewtXHTMLScript element.
 ax_javascript ($content, $attributes=null)
 Create an AnewtXHTMLScript element for JavaScript.
 ax_javascript_src ($src, $attributes=null)
 Create an AnewtXHTMLScript element for JavaScript with a src attribute.
 ax_meta ($attributes=null)
 Create an AnewtXHTMLMeta element.
 ax_meta_name_content ($name, $content, $attributes=null)
 Create an AnewtXHTMLMeta element with name and content attributes.
 ax_title ($content)
 Create an AnewtXHTMLTitle element.


Detailed Description

XHTML convenience API functions.

Definition in file api.lib.php.


Function Documentation

ax_raw ( content  ) 

Create a new raw content node.

Parameters:
$content The content of the raw node.
See also:
AnewtXHTMLRaw

Definition at line 26 of file api.lib.php.

ax_fragment ( children = null  ) 

Create a new fragment node.

Parameters:
$children The content of the fragment node.
See also:
AnewtXHTMLFragment

Definition at line 41 of file api.lib.php.

ax_sprintf ( format,
values 
)

Format a text node using a format specifier and supplied values.

This method acts like sprintf(), but supports DOM nodes and takes care of XML escaping. This function formats its arguments into a (raw) DOM node instead of a string. The supplied values may regular values such as strings and numbers, but may be XML nodes as well. This means you can pass XML node instances created by the functions in the xhtml module as values. The format specifier will be escaped for XML, and XML nodes will be rendered into escaped strings before substitution into the format specifier.

This example results in a valid XHTML paragraph:

ax_p(ax_sprintf('s & s', ax_span_class('Sugar', 'sweet'), 'Spice'));

Parameters:
$format A format specifier in sprintf syntax.
$values One or more values to be substituted into the format string.
Returns:
An AnewtXHTMLRaw instance that can be added to a DOM tree (or page).

Definition at line 77 of file api.lib.php.

ax_em ( content,
attributes = null 
)

Create an AnewtXHTMLEmphasis element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 114 of file api.lib.php.

ax_strong ( content,
attributes = null 
)

Create an AnewtXHTMLStrong element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 126 of file api.lib.php.

ax_dfn ( content,
attributes = null 
)

Create an AnewtXHTMLDefinition element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 138 of file api.lib.php.

ax_code ( content,
attributes = null 
)

Create an AnewtXHTMLCode element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 150 of file api.lib.php.

ax_sample ( content,
attributes = null 
)

Create an AnewtXHTMLSample element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 162 of file api.lib.php.

ax_kbd ( content,
attributes = null 
)

Create an AnewtXHTMLKeyboard element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 174 of file api.lib.php.

ax_var ( content,
attributes = null 
)

Create an AnewtXHTMLVariable element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 186 of file api.lib.php.

ax_cite ( content,
attributes = null 
)

Create an AnewtXHTMLCitation element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 198 of file api.lib.php.

ax_abbr ( content,
title,
attributes = null 
)

Create an AnewtXHTMLAbbreviation element.

Parameters:
$content The content for this element
$title The full text for this abbreviation
$attributes Additional element attributes (optional)

Definition at line 211 of file api.lib.php.

ax_acronym ( content,
title,
attributes = null 
)

Create an AnewtXHTMLAcronym element.

Parameters:
$content The content for this element
$title The full text for this acronym
$attributes Additional element attributes (optional)

Definition at line 224 of file api.lib.php.

ax_blockquote ( content,
attributes = null 
)

Create an AnewtXHTMLBlockQuote element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 239 of file api.lib.php.

ax_q ( content,
attributes = null 
)

Create an AnewtXHTMLQuote element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 250 of file api.lib.php.

ax_sub ( content,
attributes = null 
)

Create an AnewtXHTMLSubscript element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 264 of file api.lib.php.

ax_sup ( content,
attributes = null 
)

Create an AnewtXHTMLSuperscript element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 275 of file api.lib.php.

ax_p ( content,
attributes = null 
)

Create an AnewtXHTMLParagraph element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 289 of file api.lib.php.

ax_p_class ( content,
class,
attributes = null 
)

Create an AnewtXHTMLParagraph element with a class.

Parameters:
$content The content for this element
$class The class name for this element
$attributes Additional element attributes (optional)

Definition at line 301 of file api.lib.php.

ax_br ( attributes = null  ) 

Create an AnewtXHTMLBreak element.

Parameters:
$attributes Additional element attributes (optional)

Definition at line 312 of file api.lib.php.

ax_pre ( content,
attributes = null 
)

Create an AnewtXHTMLPreformatted element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 323 of file api.lib.php.

ax_ins ( content,
attributes = null 
)

Create an AnewtXHTMLInsertion element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 337 of file api.lib.php.

ax_del ( content,
attributes = null 
)

Create an AnewtXHTMLDeletion element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 348 of file api.lib.php.

ax_h1 ( content,
attributes = null 
)

Create an AnewtXHTMLHeader1 element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 362 of file api.lib.php.

ax_h2 ( content,
attributes = null 
)

Create an AnewtXHTMLHeader2 element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 373 of file api.lib.php.

ax_h3 ( content,
attributes = null 
)

Create an AnewtXHTMLHeader3 element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 384 of file api.lib.php.

ax_h4 ( content,
attributes = null 
)

Create an AnewtXHTMLHeader4 element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 396 of file api.lib.php.

ax_h5 ( content,
attributes = null 
)

Create an AnewtXHTMLHeader5 element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 407 of file api.lib.php.

ax_h6 ( content,
attributes = null 
)

Create an AnewtXHTMLHeader6 element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 418 of file api.lib.php.

ax_ul ( attributes = null  ) 

Create an AnewtXHTMLUnorderedList element.

Parameters:
$attributes Additional element attributes (optional)

Definition at line 433 of file api.lib.php.

ax_ul_items ( items,
attributes = null 
)

Create an AnewtXHTMLUnorderedList element with items.

Parameters:
$items List of AnewtXHTMLListItem instances to append to the list.
$attributes Additional element attributes (optional)

Definition at line 444 of file api.lib.php.

ax_ol ( attributes = null  ) 

Create an AnewtXHTMLOrderedList element.

Parameters:
$attributes Additional element attributes (optional)

Definition at line 456 of file api.lib.php.

ax_ol_items ( items,
attributes = null 
)

Create an AnewtXHTMLOrderedList element with items.

Parameters:
$items List of AnewtXHTMLListItem instances to append to the list.
$attributes Additional element attributes (optional)

Definition at line 467 of file api.lib.php.

ax_li ( content,
attributes = null 
)

Create an AnewtXHTMLListItem element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 480 of file api.lib.php.

ax_li_class ( content,
class,
attributes = null 
)

Create an AnewtXHTMLListItem element with a class.

Parameters:
$content The content for this element
$class The class name for this element
$attributes Additional element attributes (optional)

Definition at line 492 of file api.lib.php.

ax_dl ( attributes = null  ) 

Create an AnewtXHTMLDefinitionList element.

Parameters:
$attributes Additional element attributes (optional)

Definition at line 506 of file api.lib.php.

ax_dl_items ( items,
attributes = null 
)

Create an AnewtXHTMLDefinitionList element with items.

Parameters:
$items List of AnewtXHTMLDefinitionTerm or AnewtXHTMLDefinitionDescription instances to append to the list.
$attributes Additional element attributes (optional)

Definition at line 518 of file api.lib.php.

ax_dt ( content,
attributes = null 
)

Create an AnewtXHTMLDefinitionTerm element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 530 of file api.lib.php.

ax_dd ( content,
attributes = null 
)

Create an AnewtXHTMLDefinitionDescription element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 541 of file api.lib.php.

ax_div ( content,
attributes = null 
)

Create an AnewtXHTMLDiv element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 555 of file api.lib.php.

ax_div_id ( content,
id,
attributes = null 
)

Create an AnewtXHTMLDiv element with an id.

Parameters:
$content The content for this element
$id The id for this element
$attributes Additional element attributes (optional)

Definition at line 567 of file api.lib.php.

ax_div_class ( content,
class,
attributes = null 
)

Create an AnewtXHTMLDiv element with a class.

Parameters:
$content The content for this element
$class The class name for this element
$attributes Additional element attributes (optional)

Definition at line 580 of file api.lib.php.

ax_div_class_id ( content,
class,
id,
attributes = null 
)

Create an AnewtXHTMLDiv element with a class and id.

Parameters:
$content The content for this element
$class The class name for this element
$id The id for this element
$attributes Additional element attributes (optional)

Definition at line 594 of file api.lib.php.

ax_span ( content,
attributes = null 
)

Create an AnewtXHTMLSpan element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 607 of file api.lib.php.

ax_span_id ( content,
id,
attributes = null 
)

Create an AnewtXHTMLSpan element with an id.

Parameters:
$content The content for this element
$id The id for this element
$attributes Additional element attributes (optional)

Definition at line 619 of file api.lib.php.

ax_span_class ( content,
class,
attributes = null 
)

Create an AnewtXHTMLSpan element with a class.

Parameters:
$content The content for this element
$class The class name for this element
$attributes Additional element attributes (optional)

Definition at line 632 of file api.lib.php.

ax_span_class_id ( content,
class,
id,
attributes = null 
)

Create an AnewtXHTMLSpan element with a class and id.

Parameters:
$content The content for this element
$class The class name for this element
$id The id for this element
$attributes Additional element attributes (optional)

Definition at line 646 of file api.lib.php.

ax_a ( content,
attributes = null 
)

Create an AnewtXHTMLAnchor element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 662 of file api.lib.php.

ax_a_href ( content,
href,
attributes = null 
)

Create an AnewtXHTMLAnchor element with a href attribute.

Parameters:
$content The content for this element
$href The link target used for the href attribute
$attributes Additional element attributes (optional)

Definition at line 674 of file api.lib.php.

ax_a_href_rel ( content,
href,
rel,
attributes = null 
)

Create an AnewtXHTMLAnchor element with href and rel attributes.

Parameters:
$content The content for this element
$href The link target used for the href attribute
$rel The value for the rel attribute
$attributes Additional element attributes (optional)

Definition at line 688 of file api.lib.php.

ax_a_href_title ( content,
href,
title,
attributes = null 
)

Create an AnewtXHTMLAnchor element with href and title attributes.

Parameters:
$content The content for this element
$href The link target used for the href attribute
$title The value for the title attribute
$attributes Additional element attributes (optional)

Definition at line 703 of file api.lib.php.

ax_link ( attributes = null  ) 

Create an AnewtXHTMLLink element.

Parameters:
$attributes Additional element attributes (optional)

Definition at line 715 of file api.lib.php.

ax_link_rss ( href,
title,
attributes = null 
)

Create an AnewtXHTMLLink element for RSS feeds.

Parameters:
$href The link target used for the href attribute
$title The value for the title attribute
$attributes Additional element attributes (optional)

Definition at line 727 of file api.lib.php.

ax_link_favicon ( href,
attributes = null 
)

Create an AnewtXHTMLLink element for favicons.

Parameters:
$href The link target used for the href attribute
$attributes Additional element attributes (optional)

Definition at line 742 of file api.lib.php.

ax_base ( attributes = null  ) 

Create an AnewtXHTMLBase element.

Parameters:
$attributes Additional element attributes (optional)

Definition at line 755 of file api.lib.php.

ax_img ( src,
attributes = null 
)

Create an image element.

This is an alias for ax_img_src().

Parameters:
$src Source for the image
$attributes Additional element attributes (optional)
See also:
ax_img_src

Definition at line 770 of file api.lib.php.

ax_img_src ( src,
attributes = null 
)

Create an image element.

Parameters:
$src Source for the image
$attributes Additional element attributes (optional)

Definition at line 781 of file api.lib.php.

ax_img_src_alt ( src,
alt,
attributes = null 
)

Create an image element with an alt attribute.

Parameters:
$src Source for the image
$alt The alternative text for the image
$attributes Additional element attributes (optional)

Definition at line 794 of file api.lib.php.

ax_img_src_alt_title ( src,
alt,
title,
attributes = null 
)

Create an image element with alt and title attributes.

Parameters:
$src Source for the image
$alt The alternative text for the image
$title The title for the image
$attributes Additional element attributes (optional)

Definition at line 809 of file api.lib.php.

ax_tt ( content,
attributes = null 
)

Create an AnewtXHTMLTeletype element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 824 of file api.lib.php.

ax_i ( content,
attributes = null 
)

Create an AnewtXHTMLItalic element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 835 of file api.lib.php.

ax_b ( content,
attributes = null 
)

Create an AnewtXHTMLBold element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 846 of file api.lib.php.

ax_big ( content,
attributes = null 
)

Create an AnewtXHTMLBig element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 857 of file api.lib.php.

ax_small ( content,
attributes = null 
)

Create an AnewtXHTMLSmall element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 868 of file api.lib.php.

ax_strike ( content,
attributes = null 
)

Create an AnewtXHTMLStrike element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 879 of file api.lib.php.

ax_u ( content,
attributes = null 
)

Create an AnewtXHTMLUnderline element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 890 of file api.lib.php.

ax_stylesheet ( content,
attributes = null 
)

Create an AnewtXHTMLStyle element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 904 of file api.lib.php.

ax_stylesheet_href ( href,
attributes = null 
)

Create an AnewtXHTMLStyle element with an href attribute.

Parameters:
$href The link target used for the href attribute
$attributes Additional element attributes (optional)

Definition at line 916 of file api.lib.php.

ax_stylesheet_href_media ( href,
media,
attributes = null 
)

Create an AnewtXHTMLStyle element with href and media attributes.

Parameters:
$href The link target used for the href attribute
$media The value for the media attribute
$attributes Additional element attributes (optional)

Definition at line 928 of file api.lib.php.

ax_script ( content,
attributes = null 
)

Create an AnewtXHTMLScript element.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 943 of file api.lib.php.

ax_javascript ( content,
attributes = null 
)

Create an AnewtXHTMLScript element for JavaScript.

Parameters:
$content The content for this element
$attributes Additional element attributes (optional)

Definition at line 954 of file api.lib.php.

ax_javascript_src ( src,
attributes = null 
)

Create an AnewtXHTMLScript element for JavaScript with a src attribute.

Parameters:
$src Source url of the script
$attributes Additional element attributes (optional)

Definition at line 966 of file api.lib.php.

ax_meta ( attributes = null  ) 

Create an AnewtXHTMLMeta element.

Parameters:
$attributes Additional element attributes (optional)

Definition at line 977 of file api.lib.php.

ax_meta_name_content ( name,
content,
attributes = null 
)

Create an AnewtXHTMLMeta element with name and content attributes.

Parameters:
$name The value for the name attribute
$content The value for the content attribute
$attributes Additional element attributes (optional)

Definition at line 989 of file api.lib.php.

ax_title ( content  ) 

Create an AnewtXHTMLTitle element.

Parameters:
$content The content for this element

Definition at line 1001 of file api.lib.php.


Generated on Sun Aug 2 22:54:36 2009 for Anewt by  doxygen 1.5.9