Label::getLabel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * Manage Form
5
 *
6
 * @category  	lib
7
 * @package		lib\Form
8
 * @author    	Judicaël Paquet <[email protected]>
9
 * @copyright 	Copyright (c) 2013-2014 PAQUET Judicaël FR Inc. (https://github.com/las93)
10
 * @license   	https://github.com/las93/venus2/blob/master/LICENSE.md Tout droit réservé à PAQUET Judicaël
11
 * @version   	Release: 1.0.0
12
 * @filesource	https://github.com/las93/venus2
13
 * @link      	https://github.com/las93
14
 * @since     	1.0
15
 */
16
namespace Venus\lib\Form;
17
18
/**
19
 * This class manage the Form
20
 *
21
 * @category  	lib
22
 * @package		lib\Form
23
 * @author    	Judicaël Paquet <[email protected]>
24
 * @copyright 	Copyright (c) 2013-2014 PAQUET Judicaël FR Inc. (https://github.com/las93)
25
 * @license   	https://github.com/las93/venus2/blob/master/LICENSE.md Tout droit réservé à PAQUET Judicaël
26
 * @version   	Release: 1.0.0
27
 * @filesource	https://github.com/las93/venus2
28
 * @link      	https://github.com/las93
29
 * @since     	1.0
30
 */
31
class Label extends Common
32
{
33
	/**
34
	 * the label of element
35
	 *
36
	 * @access private
37
	 * @var    string
38
	 */
39
	private $_sLabel = null;
40
	
41
	/**
42
	 * the value of element
43
	 *
44
	 * @access private
45
	 * @var    string
46
	 */
47
	public function __construct(string $sLabel)
48
	{
49
		$this->setLabel($sLabel);
50
	}
51
52
	/**
53
	 * get the Label
54
	 *
55
	 * @access public
56
	 * @return string
57
	 */
58
	public function getLabel() : string
59
	{
60
		return $this->_sLabel;
61
	}
62
63
	/**
64
	 * set the Label
65
	 *
66
	 * @access public
67
	 * @param  string $sLabel Label of input;
68
	 * @return \Venus\lib\Form\Input
69
	 */
70
	public function setLabel(string $sLabel) : Input
71
	{
72
		$this->_sLabel = $sLabel;
73
		return $this;
74
	}
75
76
	/**
77
	 * get the <html>
78
	 *
79
	 * @access public
80
	 * @return string
81
	 */
82
	public function fetch() : string
83
	{
84
		$sContent = '<label>'.$this->getLabel().'</label> ';
85
86
		return $sContent;
87
	}
88
}
89