public function button($class, $name, array $options = array())
    {
        $attributes = array('type' => 'button');
        foreach ($options as $key => $value) {
            if (!in_array($key, array('dropdown', 'dropup', 'active', 'disabled', 'pull'))) {
                $attributes[$key] = $value;
            }
        }
        $attributes['class'] = $this->prefixClasses('btn', array('block', 'xs', 'sm', 'lg', 'default', 'primary', 'success', 'info', 'warning', 'danger', 'link'), $class);
        if (isset($options['dropdown']) || isset($options['dropup'])) {
            $html = '';
            unset($attributes['href']);
            $class = (isset($options['dropup'])) ? 'btn-group dropup' : 'btn-group';
            $links = (isset($options['dropup'])) ? $options['dropup'] : $options['dropdown'];
            $html .= '<div class="'.$class.'">';
            list($dropdown, $id) = $this->dropdown($links, $options);
            if (is_array($name) && isset($name['split'])) {
                $html .= $this->page->tag('button', $attributes, $name['split']);
                $attributes['id'] = $id;
                $attributes['class'] .= ' dropdown-toggle';
                $attributes['data-toggle'] = 'dropdown';
                $attributes['aria-haspopup'] = 'true';
                $attributes['aria-expanded'] = 'false';
                $html .= $this->page->tag('button', $attributes, '<span class="caret"></span>', '<span class="sr-only">Toggle Dropdown</span>');
            } else {
                $attributes['id'] = $id;
                $attributes['class'] .= ' dropdown-toggle';
                $attributes['data-toggle'] = 'dropdown';
                $attributes['aria-haspopup'] = 'true';
                $attributes['aria-expanded'] = 'false';
                $html .= $this->page->tag('button', $attributes, $name, '<span class="caret"></span>');
            }
            $html .= $dropdown;
            $html .= '</div>';

            return $html;
        } elseif (isset($options['href'])) {
            unset($attributes['type']);

            return $this->page->tag('a', $attributes, $name);
        } else {
            return $this->page->tag('button', $attributes, $name);
        }
    }