* Return null if no attributes given.
* @param $attribs Array of attributes for an XML element
*/
- private static function expandAttributes( $attribs ) {
+ public static function expandAttributes( $attribs ) {
$out = '';
if( is_null( $attribs ) ) {
return null;
}
public function addOption( $name, $value = false ) {
- $value = $value ? $value : $name;
+ // Stab stab stab
+ $value = ($value !== false) ? $value : $name;
$this->options[] = Xml::option( $name, $value, $value === $this->default );
}
return Xml::tags( 'select', $this->attributes, implode( "\n", $this->options ) );
}
-}
\ No newline at end of file
+}