1<?php
2/**
3 * Zend Framework (http://framework.zend.com/)
4 *
5 * @link      http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license   http://framework.zend.com/license/new-bsd New BSD License
8 */
9
10namespace Zend\Form\View\Helper;
11
12use Zend\Form\ElementInterface;
13
14class FormNumber extends FormInput
15{
16    /**
17     * Attributes valid for the input tag type="number"
18     *
19     * @var array
20     */
21    protected $validTagAttributes = array(
22        'name'           => true,
23        'autocomplete'   => true,
24        'autofocus'      => true,
25        'disabled'       => true,
26        'form'           => true,
27        'list'           => true,
28        'max'            => true,
29        'min'            => true,
30        'step'           => true,
31        'placeholder'    => true,
32        'readonly'       => true,
33        'required'       => true,
34        'type'           => true,
35        'value'          => true
36    );
37
38    /**
39     * Determine input type to use
40     *
41     * @param  ElementInterface $element
42     * @return string
43     */
44    protected function getType(ElementInterface $element)
45    {
46        return 'number';
47    }
48}
49