Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
Range | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | /** |
3 | * Pop PHP Framework (http://www.popphp.org/) |
4 | * |
5 | * @link https://github.com/popphp/popphp-framework |
6 | * @author Nick Sagona, III <dev@nolainteractive.com> |
7 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
8 | * @license http://www.popphp.org/license New BSD License |
9 | */ |
10 | |
11 | /** |
12 | * @namespace |
13 | */ |
14 | namespace Pop\Form\Element\Input; |
15 | |
16 | use Pop\Form\Element; |
17 | |
18 | /** |
19 | * Form range element class |
20 | * |
21 | * @category Pop |
22 | * @package Pop\Form |
23 | * @author Nick Sagona, III <dev@nolainteractive.com> |
24 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
25 | * @license http://www.popphp.org/license New BSD License |
26 | * @version 4.0.0 |
27 | */ |
28 | |
29 | class Range extends Element\Input |
30 | { |
31 | |
32 | /** |
33 | * Constructor |
34 | * |
35 | * Instantiate the range input form element |
36 | * |
37 | * @param string $name |
38 | * @param int $min |
39 | * @param int $max |
40 | * @param ?string $value |
41 | * @param ?string $indent |
42 | */ |
43 | public function __construct(string $name, int $min, int $max, ?string $value = null, ?string $indent = null) |
44 | { |
45 | parent::__construct($name, 'range', $value, $indent); |
46 | $this->setAttributes([ |
47 | 'min' => $min, |
48 | 'max' => $max |
49 | ]); |
50 | } |
51 | |
52 | } |