Completed
Branch BUG-9019-ticket-selector-submi... (c1f9d8)
by
unknown
435:14 queued 416:01
created

EE_Template_Part   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 114
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0
Metric Value
wmc 9
lcom 0
cbo 0
dl 0
loc 114
rs 10

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A name() 0 3 1
A set_name() 0 3 1
A label() 0 3 1
A set_label() 0 3 1
A template() 0 3 1
A set_template() 0 3 1
A priority() 0 3 1
A set_priority() 0 3 1
1
<?php
2
//namespace EventEspresso\core\libraries\templates;
3
4
if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
5
	exit( 'No direct script access allowed' );
6
}
7
/**
8
 * Class EE_Template_Part
9
 *
10
 * class for holding details about a template part
11
 *
12
 * @package               Event Espresso
13
 * @subpackage            core
14
 * @author                Brent Christensen
15
 * @since                 $VID:$
16
 *
17
 */
18
class EE_Template_Part {
19
20
21
	/**
22
	 * @type string $name
23
	 */
24
	protected $name;
25
26
	/**
27
	 * @type string $label
28
	 */
29
	protected $label;
30
31
	/**
32
	 * @type string $template
33
	 */
34
	protected $template;
35
36
	/**
37
	 * @type int $priority
38
	 */
39
	protected $priority;
40
41
42
43
	/**
44
	 *    class constructor
45
	 * @param string $name
46
	 * @param string $label
47
	 * @param string $template
48
	 * @param int    $priority
49
	 */
50
	public function __construct( $name, $label, $template, $priority = 100 ) {
51
		$this->set_name( $name );
52
		$this->set_label( $label );
53
		$this->set_template( $template );
54
		$this->set_priority( $priority );
55
	}
56
57
58
59
	/**
60
	 * @return mixed
61
	 */
62
	public function name() {
63
		return $this->name;
64
	}
65
66
67
68
	/**
69
	 * @param mixed $name
70
	 */
71
	public function set_name( $name ) {
72
		$this->name = $name;
73
	}
74
75
76
77
	/**
78
	 * @return string
79
	 */
80
	public function label() {
81
		return $this->label;
82
	}
83
84
85
86
	/**
87
	 * @param string $label
88
	 */
89
	public function set_label( $label ) {
90
		$this->label = $label;
91
	}
92
93
94
95
	/**
96
	 * @return array
97
	 */
98
	public function template() {
99
		return $this->template;
100
	}
101
102
103
104
	/**
105
	 * @param string $template
106
	 */
107
	public function set_template( $template ) {
108
		$this->template = $template;
109
	}
110
111
112
113
	/**
114
	 * @return int
115
	 */
116
	public function priority() {
117
		return $this->priority;
118
	}
119
120
121
122
	/**
123
	 * @param int $priority
124
	 */
125
	public function set_priority( $priority ) {
126
		$this->priority = intval( $priority );
127
	}
128
129
130
131
}
132
// End of file EE_Template_Part
133
// Location: core/libraries/templates/EE_Template_Part.class.php