Completed
Push — master ( fcfed5...b7a7dd )
by Jean-Christophe
03:28
created

HtmlCardGroups   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 2
dl 0
loc 23
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A createElement() 0 3 1
A newItem() 0 3 1
A getCard() 0 3 1
A getCardContent() 0 3 1
1
<?php
2
3
namespace Ajax\semantic\html\views;
4
5
6
use Ajax\semantic\html\content\view\HtmlViewGroups;
7
8
class HtmlCardGroups extends HtmlViewGroups {
9
10
	public function __construct($identifier, $cards=array()) {
11
		parent::__construct($identifier, "ui cards",$cards);
12
	}
13
14
	protected function createElement(){
15
		return new HtmlCard("card-" . $this->count());
16
	}
17
18
	public function newItem($identifier) {
19
		return new HtmlCard($identifier);
20
	}
21
22
	public function getCard($index) {
23
		return $this->getItem($index);
24
	}
25
26
	public function getCardContent($cardIndex, $contentIndex) {
27
		return $this->getItemContent($cardIndex, $contentIndex);
28
	}
29
30
}