Completed
Push — master ( b49918...3cf661 )
by Jean-Christophe
03:33
created

HtmlFormInput   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
c 2
b 0
f 0
lcom 0
cbo 2
dl 0
loc 16
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 2
A setPlaceholder() 0 3 1
A setValue() 0 3 1
1
<?php
2
3
namespace Ajax\semantic\html\collections\form;
4
5
use Ajax\semantic\html\collections\form\HtmlFormField;
6
use Ajax\common\html\html5\HtmlInput;
7
8
class HtmlFormInput extends HtmlFormField {
9
10
	public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) {
11
		if(!isset($placeholder))
12
			$placeholder=$label;
13
		parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label);
14
	}
15
16
	public function setPlaceholder($value){
17
		return $this->getField()->setPlaceholder($value);
18
	}
19
20
	public function setValue($value){
21
		return $this->getField()->setValue($value);
22
	}
23
}