Completed
Push — master ( 409900...f20dfb )
by Jean-Christophe
03:24
created

HtmlInput   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 17
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A setValue() 0 3 1
A setInputType() 0 3 1
1
<?php
2
3
namespace Ajax\common\html\html5;
4
5
use Ajax\common\html\HtmlSingleElement;
6
7
class HtmlInput extends HtmlSingleElement {
8
9
	public function __construct($identifier,$type="text") {
10
		parent::__construct($identifier, "input");
11
		$this->setProperty("name", $identifier);
12
		$this->setProperty("value", "");
13
		$this->setProperty("type", $type);
14
	}
15
16
	public function setValue($value) {
17
		$this->setProperty("value", $value);
18
	}
19
20
	public function setInputType($value) {
21
		$this->setProperty("type", $value);
22
	}
23
}