MediaWiki  REL1_20
Xml Class Reference

Module of static functions for generating XML. More...

List of all members.

Static Public Member Functions

static attrib ($name, $present=true)
 Internal function for use in checkboxes and radio buttons and such.
static buildForm ($fields, $submitLabel=null)
 Generate a form (without the opening form element).
static buildTable ($rows, $attribs=array(), $headers=null)
 Build a table of data.
static buildTableRow ($attribs, $cells)
 Build a row for a table.
static check ($name, $checked=false, $attribs=array())
 Convenience function to build an HTML checkbox.
static checkLabel ($label, $name, $id, $checked=false, $attribs=array())
 Convenience function to build an HTML checkbox with a label.
static closeElement ($element)
 Shortcut to close an XML element.
static dateMenu ($year, $month)
static element ($element, $attribs=null, $contents= '', $allowShortTag=true)
 Format an XML element with given attributes and, optionally, text content.
static elementClean ($element, $attribs=array(), $contents= '')
 Format an XML element as with self::element(), but run text through the $wgContLang->normalize() validator first to ensure that no invalid UTF-8 is passed.
static encodeJsCall ($name, $args)
 Create a call to a JavaScript function.
static encodeJsVar ($value)
 Encode a variable of unknown type to JavaScript.
static escapeJsString ($string)
 Returns an escaped string suitable for inclusion in a string literal for JavaScript source code.
static escapeTagsOnly ($in)
 Replace " > and < with their respective HTML entities ( ", >, <)
static expandAttributes ($attribs)
 Given an array of ('attributename' => 'value'), it generates the code to set the XML attributes : attributename="value".
static fieldset ($legend=false, $content=false, $attribs=array())
 Shortcut for creating fieldsets.
static input ($name, $size=false, $value=false, $attribs=array())
 Convenience function to build an HTML text input field.
static inputLabel ($label, $name, $id, $size=false, $value=false, $attribs=array())
 Convenience function to build an HTML text input field with a label.
static inputLabelSep ($label, $name, $id, $size=false, $value=false, $attribs=array())
 Same as Xml::inputLabel() but return input and label in an array.
static isWellFormed ($text)
 Check if a string is well-formed XML.
static isWellFormedXmlFragment ($text)
 Check if a string is a well-formed XML fragment.
static label ($label, $id, $attribs=array())
 Convenience function to build an HTML form label.
static languageSelector ($selected, $customisedOnly=true, $inLanguage=null, $overrideAttrs=array(), Message $msg=null)
 Construct a language selector appropriate for use in a form or preferences.
static listDropDown ($name= '', $list= '', $other= '', $selected= '', $class= '', $tabindex=null)
 Build a drop-down box from a textual list.
static monthSelector ($selected= '', $allmonths=null, $id= 'month')
 Create a date selector.
static namespaceSelector ($selected= '', $all=null, $element_name= 'namespace', $label=null)
 Build a drop-down box for selecting a namespace.
static openElement ($element, $attribs=null)
 This opens an XML element.
static option ($text, $value=null, $selected=false, $attribs=array())
 Convenience function to build an HTML drop-down list item.
static password ($name, $size=false, $value=false, $attribs=array())
 Convenience function to build an HTML password input field.
static radio ($name, $value, $checked=false, $attribs=array())
 Convenience function to build an HTML radio button.
static radioLabel ($label, $name, $value, $id, $checked=false, $attribs=array())
 Convenience function to build an HTML radio button with a label.
static span ($text, $class, $attribs=array())
 Shortcut to make a span element.
static submitButton ($value, $attribs=array())
 Convenience function to build an HTML submit button.
static tags ($element, $attribs=null, $contents)
 Same as Xml::element(), but does not escape contents.
static textarea ($name, $content, $cols=40, $rows=5, $attribs=array())
 Shortcut for creating textareas.
static wrapClass ($text, $class, $tag= 'span', $attribs=array())
 Shortcut to make a specific element with a class attribute.

Detailed Description

Module of static functions for generating XML.

Definition at line 26 of file Xml.php.


Member Function Documentation

static Xml::attrib ( name,
present = true 
) [static]

Internal function for use in checkboxes and radio buttons and such.

Parameters:
$namestring
$presentbool
Returns:
array

Definition at line 320 of file Xml.php.

static Xml::buildForm ( fields,
submitLabel = null 
) [static]

Generate a form (without the opening form element).

Output optionally includes a submit button.

Parameters:
$fieldsArray Associative array, key is message corresponding to a description for the field (colon is in the message), value is appropriate input.
$submitLabelString A message containing a label for the submit button.
Returns:
string HTML form.

Definition at line 768 of file Xml.php.

References $input, closeElement(), openElement(), submitButton(), tags(), and wfMessage().

Referenced by ImageListPager\getForm().

static Xml::buildTable ( rows,
attribs = array(),
headers = null 
) [static]

Build a table of data.

Parameters:
$rowsarray An array of arrays of strings, each to be a row in a table
$attribsarray An array of attributes to apply to the table tag [optional]
$headersarray An array of strings to use as table headers [optional]
Returns:
string

Definition at line 799 of file Xml.php.

References $s, buildTableRow(), closeElement(), element(), and openElement().

static Xml::buildTableRow ( attribs,
cells 
) [static]

Build a row for a table.

Parameters:
$attribsarray An array of attributes to apply to the tr tag
$cellsarray An array of strings to put in
Returns:
string

Definition at line 838 of file Xml.php.

References $s, closeElement(), element(), and openElement().

Referenced by buildTable().

static Xml::check ( name,
checked = false,
attribs = array() 
) [static]

Convenience function to build an HTML checkbox.

Parameters:
$nameString value of the name attribute
$checkedBool Whether the checkbox is checked or not
$attribsArray other attributes
Returns:
string HTML

Definition at line 331 of file Xml.php.

References element().

Referenced by checkLabel(), SpecialRecentchangeslinked\getExtraOptions(), and HTMLCheckField\getInputHTML().

static Xml::closeElement ( element) [static]

Shortcut to close an XML element.

Parameters:
$elementString element name
Returns:
string

Definition at line 117 of file Xml.php.

Referenced by ProtectionForm\buildForm(), buildForm(), ProtectionForm\buildSelector(), buildTable(), buildTableRow(), SpecialRecentChanges\doHeader(), SpecialWatchlist\execute(), SpecialStatistics\execute(), SpecialExport\execute(), SpecialListGroupRights\execute(), LinkSearchPage\execute(), MIMEsearchPage\execute(), FileDuplicateSearchPage\execute(), fieldset(), SpecialNewpages\form(), SpecialStatistics\getEditStats(), SpecialVersion\getExtensionCredits(), SpecialContributions\getForm(), DeletedContributionsPage\getForm(), SpecialStatistics\getMostViewedPages(), SpecialStatistics\getOtherStats(), WithoutInterwikiPage\getPageHeader(), UsersPager\getPageHeader(), SpecialStatistics\getPageStats(), MysqlInstaller\getSettingsForm(), SpecialStatistics\getUserStats(), SpecialStatistics\getViewsStats(), SpecialVersion\getWgHooks(), UserrightsPage\groupCheckboxes(), listDropDown(), SpecialBookSources\makeForm(), monthSelector(), SpecialPrefixindex\namespacePrefixForm(), ApiFormatXml\recXmlPrint(), UserrightsPage\showEditUserGroupsForm(), SpecialChangePassword\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialMergeHistory\showHistory(), SpecialMergeHistory\showMergeForm(), SpecialProtectedpages\showOptions(), SpecialPrefixindex\showPrefixChunk(), EmailConfirmation\showRequestForm(), SpecialSearch\showResults(), SpecialVersion\softwareInformation(), XmlTest\testCloseElement(), and SpecialEmailUser\userForm().

static Xml::dateMenu ( year,
month 
) [static]
Parameters:
$yearInteger
$monthInteger
Returns:
string Formatted HTML

Definition at line 182 of file Xml.php.

References input(), label(), monthSelector(), and wfMessage().

Referenced by SpecialContributions\getForm(), HistoryAction\onView(), and XmlTest\testDateMenu().

static Xml::element ( element,
attribs = null,
contents = '',
allowShortTag = true 
) [static]

Format an XML element with given attributes and, optionally, text content.

Element and attribute names are assumed to be ready for literal inclusion. Strings are assumed to not contain XML-illegal characters; special characters (<, >, &) are escaped but illegals are not touched.

Parameters:
$elementString: element name
$attribsArray: Name=>value pairs. Values will be escaped.
$contentsString: NULL to make an open tag only; '' for a contentless closed tag (default)
$allowShortTagBool: whether '' in $contents will result in a contentless closed tag
Returns:
string

Definition at line 39 of file Xml.php.

References $out, and expandAttributes().

Referenced by ProtectionForm\buildForm(), buildTable(), buildTableRow(), ChangeTags\buildTagFilterSelector(), check(), Preferences\datetimePreferences(), SpecialTags\doTagRow(), elementClean(), SpecialChangePassword\error(), escapeJsString(), SpecialExport\execute(), SpecialListGroupRights\execute(), LinkSearchPage\execute(), MIMEsearchPage\execute(), FileDuplicateSearchPage\execute(), LegacyTemplate\extensionTabLinks(), fieldset(), SpecialStatistics\formatRow(), ImageListPager\formatValue(), SpecialVersion\getExtensionCredits(), DeletedContributionsPage\getForm(), SpecialVersion\getMediaWikiCredits(), Skin\getNewtalks(), WithoutInterwikiPage\getPageHeader(), SpecialVersion\getWgHooks(), UserrightsPage\groupCheckboxes(), ImageHistoryList\imageHistoryLine(), input(), ChangesList\insertDateHeader(), label(), SpecialPrefixindex\namespacePrefixForm(), SpecialVersion\openExtType(), option(), DjVuImage\parseFormDjvu(), radio(), ApiFormatXml\recXmlPrint(), LoginForm\resetLoginForm(), UserrightsPage\showEditUserGroupsForm(), ProtectionForm\showLogExtract(), UserrightsPage\showLogFragment(), MovePageForm\showLogFragment(), SpecialMergeHistory\showMergeForm(), SpecialProtectedtitles\showOptions(), SpecialProtectedpages\showOptions(), SpecialSearch\showResults(), ApiFormatWddx\slowWddxPrinter(), SpecialVersion\softwareInformation(), span(), submitButton(), XmlTest\testElementAttributes(), XmlTest\testElementEmpty(), XmlTest\testElementEscaping(), XmlTest\testElementOpen(), textarea(), and Preferences\validateSignature().

static Xml::elementClean ( element,
attribs = array(),
contents = '' 
) [static]

Format an XML element as with self::element(), but run text through the $wgContLang->normalize() validator first to ensure that no invalid UTF-8 is passed.

Parameters:
$elementString:
$attribsArray: Name=>value pairs. Values will be escaped.
$contentsString: NULL to make an open tag only; '' for a contentless closed tag (default)
Returns:
string

Definition at line 88 of file Xml.php.

References $wgContLang, element(), wfProfileIn(), and wfProfileOut().

static Xml::encodeJsCall ( name,
args 
) [static]

Create a call to a JavaScript function.

The supplied arguments will be encoded using Xml::encodeJsVar().

Parameters:
$nameString The name of the function to call, or a JavaScript expression which evaluates to a function object which is called.
$argsArray of arguments to pass to the function.
Since:
1.17
Returns:
string

Definition at line 681 of file Xml.php.

References $s, and encodeJsVar().

Referenced by ProtectionForm\buildCleanupScript(), ResourceLoaderUserTokensModule\getScript(), ResourceLoaderUserOptionsModule\getScript(), ResourceLoaderLanguageDataModule\getScript(), ResourceLoaderStartUpModule\getScript(), ResourceLoader\makeConfigSetScript(), ResourceLoader\makeCustomLoaderScript(), ResourceLoader\makeLoaderImplementScript(), ResourceLoader\makeLoaderRegisterScript(), ResourceLoader\makeLoaderSourcesScript(), ResourceLoader\makeLoaderStateScript(), and ResourceLoader\makeMessageSetScript().

static Xml::encodeJsVar ( value) [static]

Encode a variable of unknown type to JavaScript.

Arrays are converted to JS arrays, objects are converted to JS associative arrays (objects). So cast your PHP associative arrays to objects before passing them to here.

Parameters:
$value
Returns:
string

Definition at line 630 of file Xml.php.

References $s, and $value.

Referenced by encodeJsCall(), WebInstaller_Complete\execute(), XmlTest\testEncodeJsVarArray(), XmlTest\testEncodeJsVarBoolean(), XmlTest\testEncodeJsVarFloat(), XmlTest\testEncodeJsVarFloatString(), XmlTest\testEncodeJsVarInt(), XmlTest\testEncodeJsVarIntString(), XmlTest\testEncodeJsVarNull(), XmlTest\testEncodeJsVarObject(), and ResourceLoaderModule\validateScriptFile().

static Xml::escapeJsString ( string) [static]

Returns an escaped string suitable for inclusion in a string literal for JavaScript source code.

Illegal control characters are assumed not to be present.

Parameters:
$stringString to escape
Returns:
String

Definition at line 593 of file Xml.php.

References element().

Referenced by QuickTemplate\jstext(), and XmlTest\testEscapeJsStringSpecialChars().

static Xml::escapeTagsOnly ( in) [static]

Replace " > and < with their respective HTML entities ( ", >, <)

Parameters:
$inString: text that might contain HTML tags.
Returns:
string Escaped string

Definition at line 754 of file Xml.php.

References $in.

Referenced by CoreTagHooks\nowiki(), CoreTagHooks\pre(), and XmlTest\testEscapeTagsOnly().

static Xml::expandAttributes ( attribs) [static]

Given an array of ('attributename' => 'value'), it generates the code to set the XML attributes : attributename="value".

The values are passed to Sanitizer::encodeAttribute. Return null if no attributes given.

Parameters:
$attribsArray of attributes for an XML element
Returns:
null|string

Definition at line 64 of file Xml.php.

References $out, and Sanitizer\encodeAttribute().

Referenced by element(), VectorTemplate\execute(), openElement(), XmlTest\testExpandAttributes(), XmlTest\testExpandAttributesException(), and Linker\tooltip().

static Xml::fieldset ( legend = false,
content = false,
attribs = array() 
) [static]

Shortcut for creating fieldsets.

Parameters:
$legendstring|bool Legend of the fieldset. If evaluates to false, legend is not added.
$contentstring Pre-escaped content for the fieldset. If false, only open fieldset is returned.
$attribsarray Any attributes to fieldset-element.
Returns:
string

Definition at line 549 of file Xml.php.

References $s, closeElement(), element(), and openElement().

Referenced by SpecialRecentChanges\doHeader(), SpecialWatchlist\execute(), SpecialNewpages\form(), ImageListPager\getForm(), SpecialContributions\getForm(), UsersPager\getPageHeader(), CategoryPager\getStartForm(), HistoryAction\onView(), SpecialChangePassword\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), and UserrightsPage\switchForm().

static Xml::input ( name,
size = false,
value = false,
attribs = array() 
) [static]

Convenience function to build an HTML text input field.

Parameters:
$nameString value of the name attribute
$sizeint value of the size attribute
$valuemixed value of the value attribute
$attribsarray other attributes
Returns:
string HTML

Definition at line 286 of file Xml.php.

References $size, $value, and element().

Referenced by ProtectionForm\buildForm(), ChangeTags\buildTagFilterSelector(), dateMenu(), SpecialNewpages\form(), SpecialRecentchangeslinked\getExtraOptions(), UsersPager\getPageHeader(), SpecialProtectedpages\getSizeLimit(), SpecialPrefixindex\namespacePrefixForm(), password(), UserrightsPage\showEditUserGroupsForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialMergeHistory\showHistory(), SpecialMergeHistory\showMergeForm(), and XmlTest\testElementInputCanHaveAValueOfZero().

static Xml::inputLabel ( label,
name,
id,
size = false,
value = false,
attribs = array() 
) [static]

Convenience function to build an HTML text input field with a label.

Parameters:
$labelString text of the label
$nameString value of the name attribute
$idString id of the input
$sizeInt|Bool value of the size attribute
$valueString|Bool value of the value attribute
$attribsarray other attributes
Returns:
string HTML

Definition at line 390 of file Xml.php.

References $input, $size, $value, and inputLabelSep().

Referenced by SpecialExport\execute(), LinkSearchPage\execute(), MIMEsearchPage\execute(), FileDuplicateSearchPage\execute(), WithoutInterwikiPage\getPageHeader(), CategoryPager\getStartForm(), SpecialBookSources\makeForm(), SpecialFilepath\showForm(), UserrightsPage\switchForm(), and SpecialEmailUser\userForm().

static Xml::inputLabelSep ( label,
name,
id,
size = false,
value = false,
attribs = array() 
) [static]

Same as Xml::inputLabel() but return input and label in an array.

Parameters:
$labelString
$nameString
$idString
$sizeInt|Bool
$valueString|Bool
$attribsarray
Returns:
array

Definition at line 407 of file Xml.php.

References $size, $value, and label().

Referenced by SpecialRecentChanges\categoryFilterForm(), and inputLabel().

static Xml::isWellFormed ( text) [static]

Check if a string is well-formed XML.

Must include the surrounding tag.

Parameters:
$textString: string to test.
Returns:
bool
Todo:
Error position reporting return

Definition at line 709 of file Xml.php.

Referenced by isWellFormedXmlFragment().

static Xml::isWellFormedXmlFragment ( text) [static]

Check if a string is a well-formed XML fragment.

Wraps fragment in an <html> bit and doctype, so it can be a fragment and can use HTML named entities.

Parameters:
$textString:
Returns:
bool

Definition at line 737 of file Xml.php.

References Sanitizer\hackDocType(), and isWellFormed().

static Xml::label ( label,
id,
attribs = array() 
) [static]
static Xml::languageSelector ( selected,
customisedOnly = true,
inLanguage = null,
overrideAttrs = array(),
Message msg = null 
) [static]

Construct a language selector appropriate for use in a form or preferences.

Parameters:
string$selectedThe language code of the selected language
boolean$customisedOnlyIf true only languages which have some content are listed
string$inLanguageThe ISO code of the language to display the select list in (optional)
array$overrideAttrsOverride the attributes of the select tag (since 1.20)
Message | null$msgLabel message key (since 1.20)
Returns:
array containing 2 items: label HTML and select list HTML

Definition at line 217 of file Xml.php.

References $languages, $options, Language\fetchLanguageNames(), label(), option(), tags(), and wfMessage().

Referenced by XmlTest\testLanguageSelector().

static Xml::listDropDown ( name = '',
list = '',
other = '',
selected = '',
class = '',
tabindex = null 
) [static]

Build a drop-down box from a textual list.

Parameters:
$nameMixed: Name and id for the drop-down
$listMixed: Correctly formatted text (newline delimited) to be used to generate the options
$otherMixed: Text for the "Other reasons" option
$selectedMixed: Option which should be pre-selected
$classMixed: CSS classes for the drop-down
$tabindexMixed: Value of the tabindex attribute
Returns:
string

Definition at line 489 of file Xml.php.

References $options, $value, closeElement(), openElement(), and option().

Referenced by ProtectionForm\buildForm(), and SpecialRevisionDelete\showForm().

static Xml::monthSelector ( selected = '',
allmonths = null,
id = 'month' 
) [static]

Create a date selector.

Parameters:
$selectedMixed: the month which should be selected, default ''
$allmonthsString: value of a special item denoting all month. Null to not include (default)
$idString: Element identifier
Returns:
String: Html string containing the month selector

Definition at line 163 of file Xml.php.

References $options, $wgLang, closeElement(), openElement(), option(), and wfMessage().

Referenced by dateMenu().

static Xml::namespaceSelector ( selected = '',
all = null,
element_name = 'namespace',
label = null 
) [static]

Build a drop-down box for selecting a namespace.

Parameters:
$selectedMixed: Namespace which should be pre-selected
$allMixed: Value of an item denoting all namespaces, or null to omit
$element_nameString: value of the "name" attribute of the select tag
$labelString: optional label to add to the field
Returns:
string
Deprecated:
since 1.19

Definition at line 142 of file Xml.php.

References wfDeprecated().

static Xml::openElement ( element,
attribs = null 
) [static]

This opens an XML element.

Parameters:
$elementString name of the element
$attribsarray of attributes, see Xml::expandAttributes()
Returns:
string

Definition at line 108 of file Xml.php.

References expandAttributes().

Referenced by ProtectionForm\buildForm(), buildForm(), ProtectionForm\buildSelector(), buildTable(), buildTableRow(), SpecialRecentChanges\doHeader(), SpecialWatchlist\execute(), SpecialStatistics\execute(), SpecialExport\execute(), SpecialListGroupRights\execute(), LinkSearchPage\execute(), MIMEsearchPage\execute(), FileDuplicateSearchPage\execute(), fieldset(), SpecialNewpages\form(), SpecialStatistics\getEditStats(), SpecialVersion\getExtensionCredits(), SpecialContributions\getForm(), DeletedContributionsPage\getForm(), SpecialStatistics\getMostViewedPages(), SpecialStatistics\getOtherStats(), WithoutInterwikiPage\getPageHeader(), UsersPager\getPageHeader(), SpecialStatistics\getPageStats(), MysqlInstaller\getSettingsForm(), SpecialStatistics\getUserStats(), SpecialStatistics\getViewsStats(), SpecialVersion\getWgHooks(), UserrightsPage\groupCheckboxes(), listDropDown(), SpecialBookSources\makeForm(), monthSelector(), SpecialPrefixindex\namespacePrefixForm(), CoreTagHooks\pre(), UserrightsPage\showEditUserGroupsForm(), SpecialChangePassword\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialMergeHistory\showHistory(), SpecialMergeHistory\showMergeForm(), SpecialProtectedpages\showOptions(), SpecialPrefixindex\showPrefixChunk(), EmailConfirmation\showRequestForm(), SpecialSearch\showResults(), SpecialVersion\softwareInformation(), tags(), XmlTest\testOpenElement(), SpecialRevisionDelete\tryShowFile(), and SpecialEmailUser\userForm().

static Xml::option ( text,
value = null,
selected = false,
attribs = array() 
) [static]

Convenience function to build an HTML drop-down list item.

Parameters:
$textString: text for this item
$valueString: form submission value; if empty, use text
$selectedboolean: if true, will be the default selected item
$attribsarray: optional additional HTML attributes
Returns:
string HTML

Definition at line 467 of file Xml.php.

References $value, and element().

Referenced by ProtectionForm\buildForm(), ProtectionForm\buildSelector(), XmlSelect\formatOptions(), SpecialProtectedtitles\getLevelMenu(), SpecialProtectedpages\getLevelMenu(), UsersPager\getPageHeader(), SpecialProtectedpages\getTypeMenu(), languageSelector(), listDropDown(), monthSelector(), and SpecialImport\showForm().

static Xml::password ( name,
size = false,
value = false,
attribs = array() 
) [static]

Convenience function to build an HTML password input field.

Parameters:
$namestring value of the name attribute
$sizeint value of the size attribute
$valuemixed value of the value attribute
$attribsarray other attributes
Returns:
string HTML

Definition at line 308 of file Xml.php.

References $size, $value, and input().

static Xml::radio ( name,
value,
checked = false,
attribs = array() 
) [static]

Convenience function to build an HTML radio button.

Parameters:
$nameString value of the name attribute
$valueString value of the value attribute
$checkedBool Whether the checkbox is checked or not
$attribsArray other attributes
Returns:
string HTML

Definition at line 349 of file Xml.php.

References $value, and element().

Referenced by SpecialRevisionDelete\buildCheckBoxes(), SpecialMergeHistory\formatRevisionRow(), and radioLabel().

static Xml::radioLabel ( label,
name,
value,
id,
checked = false,
attribs = array() 
) [static]

Convenience function to build an HTML radio button with a label.

Parameters:
$label
$name
$value
$id
$checkedbool
$attribsarray
Returns:
string HTML

Definition at line 443 of file Xml.php.

References $value, label(), and radio().

Referenced by WebInstaller_DBConnect\execute(), SpecialContributions\getForm(), and SpecialProtectedpages\getSizeLimit().

static Xml::span ( text,
class,
attribs = array() 
) [static]

Shortcut to make a span element.

Parameters:
$textString content of the element, will be escaped
$classString class name of the span element
$attribsarray other attributes
Returns:
string

Definition at line 262 of file Xml.php.

References element().

static Xml::textarea ( name,
content,
cols = 40,
rows = 5,
attribs = array() 
) [static]

Shortcut for creating textareas.

Parameters:
$namestring The 'name' for the textarea
$contentstring Content for the textarea
$colsint The number of columns for the textarea
$rowsint The number of rows for the textarea
$attribsarray Any other attributes for the textarea
Returns:
string

Definition at line 575 of file Xml.php.

References element().

Referenced by XmlTest\testTextareaAttribs(), and XmlTest\testTextareaNoContent().

static Xml::wrapClass ( text,
class,
tag = 'span',
attribs = array() 
) [static]

Shortcut to make a specific element with a class attribute.

Parameters:
$textstring content of the element, will be escaped
$classstring class name of the span element
$tagstring element name
$attribsarray other attributes
Returns:
string

Definition at line 274 of file Xml.php.

References tags().


The documentation for this class was generated from the following file: