Carbon_Pagination_Item_HTML::get_html()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
/**
3
 * The Carbon Pagination HTML item class.
4
 * Responsible for inserting HTML items like wrappers and separators.
5
 *
6
 * @uses Carbon_Pagination_Item
7
 */
8
class Carbon_Pagination_Item_HTML extends Carbon_Pagination_Item {
9
10
	/**
11
	 * @var string
12
	 * 
13
	 * The HTML of the item.
14
	 */
15
	protected $html = '';
16
17
	/**
18
	 * Render the item.
19
	 *
20
	 * @return string $html The HTML of the item.
21
	 */
22 2
	public function render() {
23 2
		$html = apply_filters( 'carbon_pagination_html', $this->get_html(), $this );
24
25 2
		return $html;
26
	}
27
28
	/**
29
	 * Retrieve the item HTML.
30
	 *
31
	 * @return string $html The item HTML.
32
	 */
33 1
	public function get_html() {
34 1
		return $this->html;
35
	}
36
37
	/**
38
	 * Modify the item HTML.
39
	 *
40
	 * @param string $html The new item HTML.
41
	 */
42 1
	public function set_html( $html ) {
43 1
		$this->html = $html;
44 1
	}
45
46
}