1 | <?php |
||
16 | abstract class TicketSelector |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * @var \EE_Event $event |
||
21 | */ |
||
22 | protected $event; |
||
23 | |||
24 | /** |
||
25 | * @var \EE_Ticket[] $tickets |
||
26 | */ |
||
27 | protected $tickets; |
||
28 | |||
29 | /** |
||
30 | * @var int max_attendees |
||
31 | */ |
||
32 | protected $max_attendees; |
||
33 | |||
34 | /** |
||
35 | * @var array $template_args |
||
36 | */ |
||
37 | protected $template_args; |
||
38 | |||
39 | |||
40 | |||
41 | /** |
||
42 | * TicketSelectorSimple constructor. |
||
43 | * |
||
44 | * @param \EE_Event $event |
||
45 | * @param \EE_Ticket[] $tickets |
||
46 | * @param int $max_attendees |
||
47 | * @param array $template_args |
||
48 | * @throws \EE_Error |
||
49 | */ |
||
50 | public function __construct(\EE_Event $event, array $tickets, $max_attendees, array $template_args) |
||
59 | |||
60 | |||
61 | |||
62 | /** |
||
63 | * sets any and all template args that are required for this Ticket Selector |
||
64 | * |
||
65 | * @return void |
||
66 | */ |
||
67 | abstract protected function addTemplateArgs(); |
||
68 | |||
69 | |||
70 | |||
71 | /** |
||
72 | * loadTicketSelectorTemplate |
||
73 | * |
||
74 | * @return string |
||
75 | */ |
||
76 | protected function loadTicketSelectorTemplate() |
||
92 | |||
93 | |||
94 | |||
95 | /** |
||
96 | * The __toString method allows a class to decide how it will react when it is converted to a string. |
||
97 | * |
||
98 | * @return string |
||
99 | * @link http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring |
||
100 | */ |
||
101 | public function __toString() |
||
105 | |||
106 | |||
107 | |||
108 | |||
109 | /** |
||
110 | * getHiddenInputs |
||
111 | * |
||
112 | * @return string |
||
113 | * @throws \EE_Error |
||
114 | */ |
||
115 | public function getHiddenInputs() |
||
128 | |||
129 | } |
||
130 | // End of file TicketSelector.php |
||
131 | // Location: EventEspresso\modules\ticket_selector/TicketSelector.php |