final public static function make(backup_setting $setting, $type, $label, array $attributes = null, array $options = null) {
        // Base the decision we make on the type that was sent.
        switch ($type) {
            case backup_setting::UI_HTML_CHECKBOX :
                return new backup_setting_ui_checkbox($setting, $label, null, (array)$attributes, (array)$options);
            case backup_setting::UI_HTML_DROPDOWN :
                return new backup_setting_ui_select($setting, $label, null, (array)$attributes, (array)$options);
            case backup_setting::UI_HTML_RADIOBUTTON :
                return new backup_setting_ui_radio($setting, $label, null, null, (array)$attributes, (array)$options);
            case backup_setting::UI_HTML_TEXTFIELD :
                return new backup_setting_ui_text($setting, $label, $attributes, $options);
            default:
                throw new backup_setting_ui_exception('setting_invalid_ui_type');
        }
    }
final public static function make(backup_setting $setting, $type, $label, array $attributes = null, array $options = null) {
        // Base the decision we make on the type that was sent.
        switch ($type) {
            case backup_setting::UI_HTML_CHECKBOX :
                return new backup_setting_ui_checkbox($setting, $label, null, (array)$attributes, (array)$options);
            case backup_setting::UI_HTML_DROPDOWN :
                return new backup_setting_ui_select($setting, $label, null, (array)$attributes, (array)$options);
            case backup_setting::UI_HTML_RADIOBUTTON :
                return new backup_setting_ui_radio($setting, $label, null, null, (array)$attributes, (array)$options);
            case backup_setting::UI_HTML_TEXTFIELD :
                return new backup_setting_ui_text($setting, $label, $attributes, $options);
            default:
                throw new backup_setting_ui_exception('setting_invalid_ui_type');
        }
    }
final public static function make ( backup_setting $ setting , $ type , $ label , array $ attributes = null , array $ options = null ) { // Base the decision we make on the type that was sent. switch ( $ type ) { case backup_setting :: UI_HTML_CHECKBOX : return new backup_setting_ui_checkbox ( $ setting , $ label , null , ( array ) $ attributes , ( array ) $ options ) ; case backup_setting :: UI_HTML_DROPDOWN : return new backup_setting_ui_select ( $ setting , $ label , null , ( array ) $ attributes , ( array ) $ options ) ; case backup_setting :: UI_HTML_RADIOBUTTON : return new backup_setting_ui_radio ( $ setting , $ label , null , null , ( array ) $ attributes , ( array ) $ options ) ; case backup_setting :: UI_HTML_TEXTFIELD : return new backup_setting_ui_text ( $ setting , $ label , $ attributes , $ options ) ; default : throw new backup_setting_ui_exception ( 'setting_invalid_ui_type' ) ; } }
Creates a new backup setting ui based on the setting it is given

@throws backup_setting_ui_exception if the setting type is not supported,
@param backup_setting $setting
@param int $type The backup_setting UI type. One of backup_setting::UI_*;
@param string $label The label to display with the setting ui
@param array $attributes Array of HTML attributes to apply to the element
@param array $options Array of options to apply to the setting ui object
@return backup_setting_ui_text|backup_setting_ui_checkbox|backup_setting_ui_select|backup_setting_ui_radio
Creates a new backup setting ui based on the setting it is given