# If one of the options' 'name' is int(0), it is automatically selected.
# because PHP sucks and thinks int(0) == 'some string'.
# Working around this by forcing all of them to strings.
- foreach( $this->mParams['options'] as $key => &$opt ){
+ foreach( $this->mParams['options'] as &$opt ){
if( is_int( $opt ) ){
$opt = strval( $opt );
}
* features might be added, like allowing arrays for the values of
* attributes like class= and media=.
*
- * @param $element string The element's name, e.g., 'a'
- * @param $attribs array Associative array of attributes, e.g., array(
+ * @param $element string The element's name, e.g., 'a'
+ * @param $attribs array Associative array of attributes, e.g., array(
* 'href' => 'http://www.mediawiki.org/' ). See expandAttributes() for
* further documentation.
* @param $contents string The raw HTML contents of the element: *not*
/**
* Identical to rawElement(), but HTML-escapes $contents (like
* Xml::element()).
+ *
+ * @param $element string
+ * @param $attribs array
+ * @param $contents string
+ *
+ * @return string
*/
public static function element( $element, $attribs = array(), $contents = '' ) {
return self::rawElement( $element, $attribs, strtr( $contents, array(
/**
* Identical to rawElement(), but has no third parameter and omits the end
* tag (and the self-closing '/' in XML mode for empty elements).
+ *
+ * @param $element string
+ * @param $attribs array
+ *
+ * @return string
*/
public static function openElement( $element, $attribs = array() ) {
global $wgHtml5, $wgWellFormedXml;