Completed
Push — master ( b9a8b8...3e8704 )
by Jean-Christophe
03:43
created

HtmlImg   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 7
c 1
b 0
f 0
lcom 2
cbo 1
dl 0
loc 33
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getSrc() 0 3 1
A setSrc() 0 4 1
A getAlt() 0 3 1
A setAlt() 0 4 1
A getTitle() 0 3 1
A setTitle() 0 4 1
1
<?php
2
3
namespace Ajax\common\html\html5;
4
5
6
use Ajax\common\html\HtmlSingleElement;
7
8
class HtmlImg extends HtmlSingleElement {
9
10
	public function __construct($identifier) {
11
		parent::__construct($identifier, "img");
12
	}
13
14
	public function getSrc() {
15
		return $this->getProperty("src");
16
	}
17
18
	public function setSrc($src) {
19
		$this->setProperty("src", $src);
20
		return $this;
21
	}
22
23
	public function getAlt() {
24
		return $this->getProperty("alt");
25
	}
26
27
	public function setAlt($alt) {
28
		$this->setProperty("alt", $alt);
29
		return $this;
30
	}
31
32
	public function getTitle() {
33
		return $this->getProperty("title");
34
	}
35
36
	public function setTitle($title) {
37
		$this->setProperty("title", $title);
38
		return $this;
39
	}
40
}