@@ -32,19 +32,19 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function isValid($file, $func, $line) |
34 | 34 | { |
35 | - if (! defined('JSON_ERROR_RECURSION')) { |
|
35 | + if ( ! defined('JSON_ERROR_RECURSION')) { |
|
36 | 36 | define('JSON_ERROR_RECURSION', 6); |
37 | 37 | } |
38 | - if (! defined('JSON_ERROR_INF_OR_NAN')) { |
|
38 | + if ( ! defined('JSON_ERROR_INF_OR_NAN')) { |
|
39 | 39 | define('JSON_ERROR_INF_OR_NAN', 7); |
40 | 40 | } |
41 | - if (! defined('JSON_ERROR_UNSUPPORTED_TYPE')) { |
|
41 | + if ( ! defined('JSON_ERROR_UNSUPPORTED_TYPE')) { |
|
42 | 42 | define('JSON_ERROR_UNSUPPORTED_TYPE', 8); |
43 | 43 | } |
44 | - if (! defined('JSON_ERROR_INVALID_PROPERTY_NAME')) { |
|
44 | + if ( ! defined('JSON_ERROR_INVALID_PROPERTY_NAME')) { |
|
45 | 45 | define('JSON_ERROR_INVALID_PROPERTY_NAME', 9); |
46 | 46 | } |
47 | - if (! defined('JSON_ERROR_UTF16')) { |
|
47 | + if ( ! defined('JSON_ERROR_UTF16')) { |
|
48 | 48 | define('JSON_ERROR_UTF16', 10); |
49 | 49 | } |
50 | 50 | switch (json_last_error()) { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $error = ': Unknown error'; |
85 | 85 | break; |
86 | 86 | } |
87 | - EE_Error::add_error('JSON decoding failed' . $error, $file, $func, $line); |
|
87 | + EE_Error::add_error('JSON decoding failed'.$error, $file, $func, $line); |
|
88 | 88 | return false; |
89 | 89 | } |
90 | 90 | } |
@@ -18,76 +18,76 @@ |
||
18 | 18 | class JsonValidator |
19 | 19 | { |
20 | 20 | |
21 | - /** |
|
22 | - * Call this method IMMEDIATELY after json_decode() and |
|
23 | - * it will will return true if the decoded JSON was valid, |
|
24 | - * or return false after adding an error if not valid. |
|
25 | - * The actual JSON file does not need to be supplied, |
|
26 | - * but details re: code execution location are required. |
|
27 | - * ex: |
|
28 | - * JsonValidator::isValid(__FILE__, __METHOD__, __LINE__) |
|
29 | - * |
|
30 | - * @param string $file |
|
31 | - * @param string $func |
|
32 | - * @param string $line |
|
33 | - * @return boolean |
|
34 | - * @since 4.9.70.p |
|
35 | - */ |
|
36 | - public function isValid($file, $func, $line) |
|
37 | - { |
|
38 | - if (! defined('JSON_ERROR_RECURSION')) { |
|
39 | - define('JSON_ERROR_RECURSION', 6); |
|
40 | - } |
|
41 | - if (! defined('JSON_ERROR_INF_OR_NAN')) { |
|
42 | - define('JSON_ERROR_INF_OR_NAN', 7); |
|
43 | - } |
|
44 | - if (! defined('JSON_ERROR_UNSUPPORTED_TYPE')) { |
|
45 | - define('JSON_ERROR_UNSUPPORTED_TYPE', 8); |
|
46 | - } |
|
47 | - if (! defined('JSON_ERROR_INVALID_PROPERTY_NAME')) { |
|
48 | - define('JSON_ERROR_INVALID_PROPERTY_NAME', 9); |
|
49 | - } |
|
50 | - if (! defined('JSON_ERROR_UTF16')) { |
|
51 | - define('JSON_ERROR_UTF16', 10); |
|
52 | - } |
|
53 | - switch (json_last_error()) { |
|
54 | - case JSON_ERROR_NONE: |
|
55 | - return true; |
|
56 | - case JSON_ERROR_DEPTH: |
|
57 | - $error = ': Maximum stack depth exceeded'; |
|
58 | - break; |
|
59 | - case JSON_ERROR_STATE_MISMATCH: |
|
60 | - $error = ': Invalid or malformed JSON'; |
|
61 | - break; |
|
62 | - case JSON_ERROR_CTRL_CHAR: |
|
63 | - $error = ': Control character error, possible malformed JSON'; |
|
64 | - break; |
|
65 | - case JSON_ERROR_SYNTAX: |
|
66 | - $error = ': Syntax error, malformed JSON'; |
|
67 | - break; |
|
68 | - case JSON_ERROR_UTF8: |
|
69 | - $error = ': Malformed UTF-8 characters, possible malformed JSON'; |
|
70 | - break; |
|
71 | - case JSON_ERROR_RECURSION: |
|
72 | - $error = ': One or more recursive references in the value to be encoded'; |
|
73 | - break; |
|
74 | - case JSON_ERROR_INF_OR_NAN: |
|
75 | - $error = ': One or more NAN or INF values in the value to be encoded'; |
|
76 | - break; |
|
77 | - case JSON_ERROR_UNSUPPORTED_TYPE: |
|
78 | - $error = ': A value of a type that cannot be encoded was given'; |
|
79 | - break; |
|
80 | - case JSON_ERROR_INVALID_PROPERTY_NAME: |
|
81 | - $error = ': A property name that cannot be encoded was given'; |
|
82 | - break; |
|
83 | - case JSON_ERROR_UTF16: |
|
84 | - $error = ': Malformed UTF-16 characters, possibly incorrectly encoded'; |
|
85 | - break; |
|
86 | - default: |
|
87 | - $error = ': Unknown error'; |
|
88 | - break; |
|
89 | - } |
|
90 | - EE_Error::add_error('JSON decoding failed' . $error, $file, $func, $line); |
|
91 | - return false; |
|
92 | - } |
|
21 | + /** |
|
22 | + * Call this method IMMEDIATELY after json_decode() and |
|
23 | + * it will will return true if the decoded JSON was valid, |
|
24 | + * or return false after adding an error if not valid. |
|
25 | + * The actual JSON file does not need to be supplied, |
|
26 | + * but details re: code execution location are required. |
|
27 | + * ex: |
|
28 | + * JsonValidator::isValid(__FILE__, __METHOD__, __LINE__) |
|
29 | + * |
|
30 | + * @param string $file |
|
31 | + * @param string $func |
|
32 | + * @param string $line |
|
33 | + * @return boolean |
|
34 | + * @since 4.9.70.p |
|
35 | + */ |
|
36 | + public function isValid($file, $func, $line) |
|
37 | + { |
|
38 | + if (! defined('JSON_ERROR_RECURSION')) { |
|
39 | + define('JSON_ERROR_RECURSION', 6); |
|
40 | + } |
|
41 | + if (! defined('JSON_ERROR_INF_OR_NAN')) { |
|
42 | + define('JSON_ERROR_INF_OR_NAN', 7); |
|
43 | + } |
|
44 | + if (! defined('JSON_ERROR_UNSUPPORTED_TYPE')) { |
|
45 | + define('JSON_ERROR_UNSUPPORTED_TYPE', 8); |
|
46 | + } |
|
47 | + if (! defined('JSON_ERROR_INVALID_PROPERTY_NAME')) { |
|
48 | + define('JSON_ERROR_INVALID_PROPERTY_NAME', 9); |
|
49 | + } |
|
50 | + if (! defined('JSON_ERROR_UTF16')) { |
|
51 | + define('JSON_ERROR_UTF16', 10); |
|
52 | + } |
|
53 | + switch (json_last_error()) { |
|
54 | + case JSON_ERROR_NONE: |
|
55 | + return true; |
|
56 | + case JSON_ERROR_DEPTH: |
|
57 | + $error = ': Maximum stack depth exceeded'; |
|
58 | + break; |
|
59 | + case JSON_ERROR_STATE_MISMATCH: |
|
60 | + $error = ': Invalid or malformed JSON'; |
|
61 | + break; |
|
62 | + case JSON_ERROR_CTRL_CHAR: |
|
63 | + $error = ': Control character error, possible malformed JSON'; |
|
64 | + break; |
|
65 | + case JSON_ERROR_SYNTAX: |
|
66 | + $error = ': Syntax error, malformed JSON'; |
|
67 | + break; |
|
68 | + case JSON_ERROR_UTF8: |
|
69 | + $error = ': Malformed UTF-8 characters, possible malformed JSON'; |
|
70 | + break; |
|
71 | + case JSON_ERROR_RECURSION: |
|
72 | + $error = ': One or more recursive references in the value to be encoded'; |
|
73 | + break; |
|
74 | + case JSON_ERROR_INF_OR_NAN: |
|
75 | + $error = ': One or more NAN or INF values in the value to be encoded'; |
|
76 | + break; |
|
77 | + case JSON_ERROR_UNSUPPORTED_TYPE: |
|
78 | + $error = ': A value of a type that cannot be encoded was given'; |
|
79 | + break; |
|
80 | + case JSON_ERROR_INVALID_PROPERTY_NAME: |
|
81 | + $error = ': A property name that cannot be encoded was given'; |
|
82 | + break; |
|
83 | + case JSON_ERROR_UTF16: |
|
84 | + $error = ': Malformed UTF-16 characters, possibly incorrectly encoded'; |
|
85 | + break; |
|
86 | + default: |
|
87 | + $error = ': Unknown error'; |
|
88 | + break; |
|
89 | + } |
|
90 | + EE_Error::add_error('JSON decoding failed' . $error, $file, $func, $line); |
|
91 | + return false; |
|
92 | + } |
|
93 | 93 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | $template_args['attributes'] = $attributes; |
47 | 47 | $template_args['attendees'] = $this->attendee_model->get_all($this->getQueryParams($attributes)); |
48 | 48 | return EEH_Template::display_template( |
49 | - $this->templateRootPath() . 'event-attendees.php', |
|
49 | + $this->templateRootPath().'event-attendees.php', |
|
50 | 50 | $template_args, |
51 | 51 | true |
52 | 52 | ); |
@@ -20,133 +20,133 @@ |
||
20 | 20 | class EventAttendeesBlockRenderer extends BlockRenderer |
21 | 21 | { |
22 | 22 | |
23 | - /** |
|
24 | - * @var EEM_Attendee |
|
25 | - */ |
|
26 | - private $attendee_model; |
|
23 | + /** |
|
24 | + * @var EEM_Attendee |
|
25 | + */ |
|
26 | + private $attendee_model; |
|
27 | 27 | |
28 | - public function __construct(DomainInterface $domain, EEM_Attendee $attendee_model) |
|
29 | - { |
|
30 | - $this->attendee_model = $attendee_model; |
|
31 | - parent::__construct($domain); |
|
32 | - } |
|
28 | + public function __construct(DomainInterface $domain, EEM_Attendee $attendee_model) |
|
29 | + { |
|
30 | + $this->attendee_model = $attendee_model; |
|
31 | + parent::__construct($domain); |
|
32 | + } |
|
33 | 33 | |
34 | 34 | |
35 | - /** |
|
36 | - * Renders the block. |
|
37 | - * |
|
38 | - * @param array $attributes Expect already validated and sanitized array of attributes for use in generating the |
|
39 | - * query and the template output. |
|
40 | - * @return string |
|
41 | - * @throws DomainException |
|
42 | - * @throws EE_Error |
|
43 | - */ |
|
44 | - public function render(array $attributes) |
|
45 | - { |
|
46 | - $attributes = $this->parseGlobalIDs($attributes); |
|
47 | - $template_args['attributes'] = $attributes; |
|
48 | - $template_args['attendees'] = $this->attendee_model->get_all($this->getQueryParams($attributes)); |
|
49 | - return EEH_Template::display_template( |
|
50 | - $this->templateRootPath() . 'event-attendees.php', |
|
51 | - $template_args, |
|
52 | - true |
|
53 | - ); |
|
54 | - } |
|
35 | + /** |
|
36 | + * Renders the block. |
|
37 | + * |
|
38 | + * @param array $attributes Expect already validated and sanitized array of attributes for use in generating the |
|
39 | + * query and the template output. |
|
40 | + * @return string |
|
41 | + * @throws DomainException |
|
42 | + * @throws EE_Error |
|
43 | + */ |
|
44 | + public function render(array $attributes) |
|
45 | + { |
|
46 | + $attributes = $this->parseGlobalIDs($attributes); |
|
47 | + $template_args['attributes'] = $attributes; |
|
48 | + $template_args['attendees'] = $this->attendee_model->get_all($this->getQueryParams($attributes)); |
|
49 | + return EEH_Template::display_template( |
|
50 | + $this->templateRootPath() . 'event-attendees.php', |
|
51 | + $template_args, |
|
52 | + true |
|
53 | + ); |
|
54 | + } |
|
55 | 55 | |
56 | 56 | |
57 | - /** |
|
58 | - * Get query parameters for model query. |
|
59 | - * |
|
60 | - * @param array $attributes |
|
61 | - * @return array |
|
62 | - */ |
|
63 | - private function parseGlobalIDs(array $attributes) |
|
64 | - { |
|
65 | - // if ticket ID is set, then that's all we need to run the query |
|
66 | - $ticket = isset($attributes['ticket']) ? $attributes['ticket'] : ''; |
|
67 | - $datetime = isset($attributes['datetime']) ? $attributes['datetime'] : ''; |
|
68 | - $event = isset($attributes['event']) ? $attributes['event'] : ''; |
|
69 | - if ($ticket !== '') { |
|
70 | - $ticketId = $this->parseGUID($ticket); |
|
71 | - $attributes['ticketId'] = $ticketId; |
|
72 | - } elseif ($datetime !== '') { |
|
73 | - $datetimeId = $this->parseGUID($datetime); |
|
74 | - $attributes['datetimeId'] = $datetimeId; |
|
75 | - } elseif ($event !== '') { |
|
76 | - $eventId = $this->parseGUID($event); |
|
77 | - $attributes['eventId'] = $eventId; |
|
78 | - } |
|
79 | - // remove unnecessary data so it doesn't get added to the query vars |
|
80 | - unset($attributes['ticket'], $attributes['datetime'], $attributes['event']); |
|
81 | - return $attributes; |
|
82 | - } |
|
57 | + /** |
|
58 | + * Get query parameters for model query. |
|
59 | + * |
|
60 | + * @param array $attributes |
|
61 | + * @return array |
|
62 | + */ |
|
63 | + private function parseGlobalIDs(array $attributes) |
|
64 | + { |
|
65 | + // if ticket ID is set, then that's all we need to run the query |
|
66 | + $ticket = isset($attributes['ticket']) ? $attributes['ticket'] : ''; |
|
67 | + $datetime = isset($attributes['datetime']) ? $attributes['datetime'] : ''; |
|
68 | + $event = isset($attributes['event']) ? $attributes['event'] : ''; |
|
69 | + if ($ticket !== '') { |
|
70 | + $ticketId = $this->parseGUID($ticket); |
|
71 | + $attributes['ticketId'] = $ticketId; |
|
72 | + } elseif ($datetime !== '') { |
|
73 | + $datetimeId = $this->parseGUID($datetime); |
|
74 | + $attributes['datetimeId'] = $datetimeId; |
|
75 | + } elseif ($event !== '') { |
|
76 | + $eventId = $this->parseGUID($event); |
|
77 | + $attributes['eventId'] = $eventId; |
|
78 | + } |
|
79 | + // remove unnecessary data so it doesn't get added to the query vars |
|
80 | + unset($attributes['ticket'], $attributes['datetime'], $attributes['event']); |
|
81 | + return $attributes; |
|
82 | + } |
|
83 | 83 | |
84 | 84 | |
85 | - /** |
|
86 | - * Get query parameters for model query. |
|
87 | - * |
|
88 | - * @param array $attributes |
|
89 | - * @return array |
|
90 | - */ |
|
91 | - private function getQueryParams(array $attributes) |
|
92 | - { |
|
93 | - return array( |
|
94 | - 0 => $this->getWhereQueryPart($attributes), |
|
95 | - 'default_where_conditions' => 'this_model_only', |
|
96 | - 'limit' => $attributes['limit'], |
|
97 | - 'group_by' => array('ATT_ID'), |
|
98 | - 'order_by' => $this->getOrderByQueryPart($attributes) |
|
99 | - ); |
|
100 | - } |
|
85 | + /** |
|
86 | + * Get query parameters for model query. |
|
87 | + * |
|
88 | + * @param array $attributes |
|
89 | + * @return array |
|
90 | + */ |
|
91 | + private function getQueryParams(array $attributes) |
|
92 | + { |
|
93 | + return array( |
|
94 | + 0 => $this->getWhereQueryPart($attributes), |
|
95 | + 'default_where_conditions' => 'this_model_only', |
|
96 | + 'limit' => $attributes['limit'], |
|
97 | + 'group_by' => array('ATT_ID'), |
|
98 | + 'order_by' => $this->getOrderByQueryPart($attributes) |
|
99 | + ); |
|
100 | + } |
|
101 | 101 | |
102 | 102 | |
103 | - /** |
|
104 | - * Get where query part for query parameters for model query. |
|
105 | - * |
|
106 | - * @param array $attributes |
|
107 | - * @return array |
|
108 | - */ |
|
109 | - private function getWhereQueryPart(array $attributes) |
|
110 | - { |
|
111 | - $where = array(); |
|
112 | - if ($attributes['ticketId'] > 0) { |
|
113 | - $where['Registration.TKT_ID'] = $attributes['ticketId']; |
|
114 | - } elseif ($attributes['datetimeId'] > 0) { |
|
115 | - $where['Registration.Ticket.Datetime.DTT_ID'] = $attributes['datetimeId']; |
|
116 | - } else { |
|
117 | - $where['Registration.EVT_ID'] = $attributes['eventId']; |
|
118 | - } |
|
119 | - $where['Registration.STS_ID'] = $attributes['status']; |
|
120 | - return $where; |
|
121 | - } |
|
103 | + /** |
|
104 | + * Get where query part for query parameters for model query. |
|
105 | + * |
|
106 | + * @param array $attributes |
|
107 | + * @return array |
|
108 | + */ |
|
109 | + private function getWhereQueryPart(array $attributes) |
|
110 | + { |
|
111 | + $where = array(); |
|
112 | + if ($attributes['ticketId'] > 0) { |
|
113 | + $where['Registration.TKT_ID'] = $attributes['ticketId']; |
|
114 | + } elseif ($attributes['datetimeId'] > 0) { |
|
115 | + $where['Registration.Ticket.Datetime.DTT_ID'] = $attributes['datetimeId']; |
|
116 | + } else { |
|
117 | + $where['Registration.EVT_ID'] = $attributes['eventId']; |
|
118 | + } |
|
119 | + $where['Registration.STS_ID'] = $attributes['status']; |
|
120 | + return $where; |
|
121 | + } |
|
122 | 122 | |
123 | 123 | |
124 | - /** |
|
125 | - * Get order by query part for query parameters for model query. |
|
126 | - * |
|
127 | - * @param array $attributes |
|
128 | - * @return array |
|
129 | - */ |
|
130 | - private function getOrderByQueryPart(array $attributes) |
|
131 | - { |
|
132 | - $order = $attributes['order']; |
|
133 | - switch ($attributes['orderBy']) { |
|
134 | - case 'id': |
|
135 | - $order_by = array('ATT_ID' => $order); |
|
136 | - break; |
|
137 | - case 'lastNameOnly': |
|
138 | - $order_by = array('ATT_lname' => $order); |
|
139 | - break; |
|
140 | - case 'firstNameOnly': |
|
141 | - $order_by = array('ATT_fname' => $order); |
|
142 | - break; |
|
143 | - case 'firstThenLastName': |
|
144 | - $order_by = array('ATT_fname' => $order, 'ATT_lname' => $order); |
|
145 | - break; |
|
146 | - default: |
|
147 | - $order_by = array('ATT_lname' => $order, 'ATT_fname' => $order); |
|
148 | - break; |
|
149 | - } |
|
150 | - return $order_by; |
|
151 | - } |
|
124 | + /** |
|
125 | + * Get order by query part for query parameters for model query. |
|
126 | + * |
|
127 | + * @param array $attributes |
|
128 | + * @return array |
|
129 | + */ |
|
130 | + private function getOrderByQueryPart(array $attributes) |
|
131 | + { |
|
132 | + $order = $attributes['order']; |
|
133 | + switch ($attributes['orderBy']) { |
|
134 | + case 'id': |
|
135 | + $order_by = array('ATT_ID' => $order); |
|
136 | + break; |
|
137 | + case 'lastNameOnly': |
|
138 | + $order_by = array('ATT_lname' => $order); |
|
139 | + break; |
|
140 | + case 'firstNameOnly': |
|
141 | + $order_by = array('ATT_fname' => $order); |
|
142 | + break; |
|
143 | + case 'firstThenLastName': |
|
144 | + $order_by = array('ATT_fname' => $order, 'ATT_lname' => $order); |
|
145 | + break; |
|
146 | + default: |
|
147 | + $order_by = array('ATT_lname' => $order, 'ATT_fname' => $order); |
|
148 | + break; |
|
149 | + } |
|
150 | + return $order_by; |
|
151 | + } |
|
152 | 152 | } |
@@ -14,11 +14,11 @@ |
||
14 | 14 | interface BlockRendererInterface |
15 | 15 | { |
16 | 16 | |
17 | - /** |
|
18 | - * This receives an array of attributes and returns rendered content for the block using those attributes. |
|
19 | - * |
|
20 | - * @param array $attributes |
|
21 | - * @return string Rendered Content |
|
22 | - */ |
|
23 | - public function render(array $attributes); |
|
17 | + /** |
|
18 | + * This receives an array of attributes and returns rendered content for the block using those attributes. |
|
19 | + * |
|
20 | + * @param array $attributes |
|
21 | + * @return string Rendered Content |
|
22 | + */ |
|
23 | + public function render(array $attributes); |
|
24 | 24 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | private function setTemplateRootPath() |
44 | 44 | { |
45 | - $this->template_root_path = $this->domain->pluginPath() . 'ui/blocks/'; |
|
45 | + $this->template_root_path = $this->domain->pluginPath().'ui/blocks/'; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 |
@@ -15,57 +15,57 @@ |
||
15 | 15 | abstract class BlockRenderer implements BlockRendererInterface |
16 | 16 | { |
17 | 17 | |
18 | - /** |
|
19 | - * @var DomainInterface |
|
20 | - */ |
|
21 | - protected $domain; |
|
18 | + /** |
|
19 | + * @var DomainInterface |
|
20 | + */ |
|
21 | + protected $domain; |
|
22 | 22 | |
23 | - /** |
|
24 | - * @var string |
|
25 | - */ |
|
26 | - private $template_root_path; |
|
23 | + /** |
|
24 | + * @var string |
|
25 | + */ |
|
26 | + private $template_root_path; |
|
27 | 27 | |
28 | 28 | |
29 | - /** |
|
30 | - * BlockRenderer constructor. |
|
31 | - * |
|
32 | - * @param DomainInterface $domain |
|
33 | - */ |
|
34 | - public function __construct(DomainInterface $domain) |
|
35 | - { |
|
36 | - $this->domain = $domain; |
|
37 | - $this->setTemplateRootPath(); |
|
38 | - } |
|
29 | + /** |
|
30 | + * BlockRenderer constructor. |
|
31 | + * |
|
32 | + * @param DomainInterface $domain |
|
33 | + */ |
|
34 | + public function __construct(DomainInterface $domain) |
|
35 | + { |
|
36 | + $this->domain = $domain; |
|
37 | + $this->setTemplateRootPath(); |
|
38 | + } |
|
39 | 39 | |
40 | 40 | |
41 | - /** |
|
42 | - * Sets the root path to the main block template. |
|
43 | - */ |
|
44 | - private function setTemplateRootPath() |
|
45 | - { |
|
46 | - $this->template_root_path = $this->domain->pluginPath() . 'ui/blocks/'; |
|
47 | - } |
|
41 | + /** |
|
42 | + * Sets the root path to the main block template. |
|
43 | + */ |
|
44 | + private function setTemplateRootPath() |
|
45 | + { |
|
46 | + $this->template_root_path = $this->domain->pluginPath() . 'ui/blocks/'; |
|
47 | + } |
|
48 | 48 | |
49 | 49 | |
50 | - /** |
|
51 | - * Exposes the root path for the main block template. |
|
52 | - * @return string |
|
53 | - */ |
|
54 | - public function templateRootPath() |
|
55 | - { |
|
56 | - return $this->template_root_path; |
|
57 | - } |
|
50 | + /** |
|
51 | + * Exposes the root path for the main block template. |
|
52 | + * @return string |
|
53 | + */ |
|
54 | + public function templateRootPath() |
|
55 | + { |
|
56 | + return $this->template_root_path; |
|
57 | + } |
|
58 | 58 | |
59 | 59 | |
60 | - /** |
|
61 | - * converts GraphQL GUID into EE DB ID |
|
62 | - * |
|
63 | - * @param string $GUID |
|
64 | - * @return int |
|
65 | - */ |
|
66 | - protected function parseGUID($GUID) |
|
67 | - { |
|
68 | - $parts = Relay::fromGlobalId($GUID); |
|
69 | - return ! empty($parts['id']) ? $parts['id'] : 0; |
|
70 | - } |
|
60 | + /** |
|
61 | + * converts GraphQL GUID into EE DB ID |
|
62 | + * |
|
63 | + * @param string $GUID |
|
64 | + * @return int |
|
65 | + */ |
|
66 | + protected function parseGUID($GUID) |
|
67 | + { |
|
68 | + $parts = Relay::fromGlobalId($GUID); |
|
69 | + return ! empty($parts['id']) ? $parts['id'] : 0; |
|
70 | + } |
|
71 | 71 | } |
@@ -23,14 +23,14 @@ |
||
23 | 23 | ) |
24 | 24 | : ''; |
25 | 25 | $gravatar_class = $attributes['avatarClass'] |
26 | - ? $attributes['avatarClass'] . ' contact-avatar-img avatar' |
|
26 | + ? $attributes['avatarClass'].' contact-avatar-img avatar' |
|
27 | 27 | : 'contact-avatar-img avatar'; |
28 | 28 | $gravatar = $gravatar !== '' |
29 | 29 | ? '<div class="contact-image-wrap-div">' |
30 | - . '<img class="' . $gravatar_class . '"' |
|
31 | - . ' width="' . $attributes['avatarSize'] . '"' |
|
32 | - . ' height="' . $attributes['avatarSize'] . '"' |
|
33 | - . ' src="' . $gravatar . '" alt="contact avatar">' |
|
30 | + . '<img class="'.$gravatar_class.'"' |
|
31 | + . ' width="'.$attributes['avatarSize'].'"' |
|
32 | + . ' height="'.$attributes['avatarSize'].'"' |
|
33 | + . ' src="'.$gravatar.'" alt="contact avatar">' |
|
34 | 34 | . '</div>' |
35 | 35 | : ''; |
36 | 36 | echo "<li>{$gravatar}<span>{$attendee->full_name()}</span>"; |
@@ -11,29 +11,29 @@ |
||
11 | 11 | <div id="ee-block-event-attendees" class="ee-core-blocks event-espresso-blocks event-attendees"> |
12 | 12 | <ul> |
13 | 13 | <?php |
14 | - foreach ($attendees as $attendee) { |
|
15 | - $gravatar = $attributes['showGravatar'] |
|
16 | - ? get_avatar_url( |
|
17 | - $attendee->email(), |
|
18 | - array( |
|
19 | - 'width' => $attributes['avatarSize'], |
|
20 | - 'height' => $attributes['avatarSize'] |
|
21 | - ) |
|
22 | - ) |
|
23 | - : ''; |
|
24 | - $gravatar_class = $attributes['avatarClass'] |
|
25 | - ? $attributes['avatarClass'] . ' contact-avatar-img avatar' |
|
26 | - : 'contact-avatar-img avatar'; |
|
27 | - $gravatar = $gravatar !== '' |
|
28 | - ? '<div class="contact-image-wrap-div">' |
|
29 | - . '<img class="' . $gravatar_class . '"' |
|
30 | - . ' width="' . $attributes['avatarSize'] . '"' |
|
31 | - . ' height="' . $attributes['avatarSize'] . '"' |
|
32 | - . ' src="' . $gravatar . '" alt="contact avatar">' |
|
33 | - . '</div>' |
|
34 | - : ''; |
|
35 | - echo "<li>{$gravatar}<span>{$attendee->full_name()}</span>"; |
|
36 | - } |
|
37 | - ?> |
|
14 | + foreach ($attendees as $attendee) { |
|
15 | + $gravatar = $attributes['showGravatar'] |
|
16 | + ? get_avatar_url( |
|
17 | + $attendee->email(), |
|
18 | + array( |
|
19 | + 'width' => $attributes['avatarSize'], |
|
20 | + 'height' => $attributes['avatarSize'] |
|
21 | + ) |
|
22 | + ) |
|
23 | + : ''; |
|
24 | + $gravatar_class = $attributes['avatarClass'] |
|
25 | + ? $attributes['avatarClass'] . ' contact-avatar-img avatar' |
|
26 | + : 'contact-avatar-img avatar'; |
|
27 | + $gravatar = $gravatar !== '' |
|
28 | + ? '<div class="contact-image-wrap-div">' |
|
29 | + . '<img class="' . $gravatar_class . '"' |
|
30 | + . ' width="' . $attributes['avatarSize'] . '"' |
|
31 | + . ' height="' . $attributes['avatarSize'] . '"' |
|
32 | + . ' src="' . $gravatar . '" alt="contact avatar">' |
|
33 | + . '</div>' |
|
34 | + : ''; |
|
35 | + echo "<li>{$gravatar}<span>{$attendee->full_name()}</span>"; |
|
36 | + } |
|
37 | + ?> |
|
38 | 38 | </ul> |
39 | 39 | </div> |
@@ -14,180 +14,180 @@ discard block |
||
14 | 14 | final class EE_Network_Config |
15 | 15 | { |
16 | 16 | |
17 | - /** |
|
18 | - * @var EE_Network_Config $_instance |
|
19 | - */ |
|
20 | - private static $_instance; |
|
21 | - |
|
22 | - /** |
|
23 | - * addons can add their specific network_config objects to this property |
|
24 | - * |
|
25 | - * @var EE_Config_Base[] $addons |
|
26 | - */ |
|
27 | - public $addons; |
|
28 | - |
|
29 | - /** |
|
30 | - * @var EE_Network_Core_Config $core |
|
31 | - */ |
|
32 | - public $core; |
|
33 | - |
|
34 | - |
|
35 | - /** |
|
36 | - * @singleton method used to instantiate class object |
|
37 | - * @return EE_Network_Config instance |
|
38 | - */ |
|
39 | - public static function instance() |
|
40 | - { |
|
41 | - // check if class object is instantiated, and instantiated properly |
|
42 | - if (! self::$_instance instanceof EE_Network_Config) { |
|
43 | - self::$_instance = new self(); |
|
44 | - } |
|
45 | - return self::$_instance; |
|
46 | - } |
|
47 | - |
|
48 | - |
|
49 | - /** |
|
50 | - * class constructor |
|
51 | - */ |
|
52 | - private function __construct() |
|
53 | - { |
|
54 | - do_action('AHEE__EE_Network_Config__construct__begin', $this); |
|
55 | - // set defaults |
|
56 | - $this->core = apply_filters('FHEE__EE_Network_Config___construct__core', new EE_Network_Core_Config()); |
|
57 | - $this->addons = array(); |
|
58 | - |
|
59 | - $this->_load_config(); |
|
60 | - |
|
61 | - // construct__end hook |
|
62 | - do_action('AHEE__EE_Network_Config__construct__end', $this); |
|
63 | - } |
|
64 | - |
|
65 | - |
|
66 | - /** |
|
67 | - * load EE Network Config options |
|
68 | - * |
|
69 | - * @return void |
|
70 | - */ |
|
71 | - private function _load_config() |
|
72 | - { |
|
73 | - // load network config start hook |
|
74 | - do_action('AHEE__EE_Network_Config___load_config__start', $this); |
|
75 | - $config = $this->get_config(); |
|
76 | - foreach ($config as $config_prop => $settings) { |
|
77 | - if ($config_prop === 'core' && ! $settings instanceof EE_Network_Core_Config) { |
|
78 | - $core = new EE_Network_Core_Config(); |
|
79 | - foreach ($settings as $prop => $setting) { |
|
80 | - if (property_exists($core, $prop)) { |
|
81 | - $core->{$prop} = $setting; |
|
82 | - } |
|
83 | - } |
|
84 | - $settings = $core; |
|
85 | - add_filter('FHEE__EE_Network_Config___load_config__update_network_config', '__return_true'); |
|
86 | - } |
|
87 | - if (is_object($settings) && property_exists($this, $config_prop)) { |
|
88 | - $this->{$config_prop} = apply_filters( |
|
89 | - 'FHEE__EE_Network_Config___load_config__config_settings', |
|
90 | - $settings, |
|
91 | - $config_prop, |
|
92 | - $this |
|
93 | - ); |
|
94 | - if (method_exists($settings, 'populate')) { |
|
95 | - $this->{$config_prop}->populate(); |
|
96 | - } |
|
97 | - if (method_exists($settings, 'do_hooks')) { |
|
98 | - $this->{$config_prop}->do_hooks(); |
|
99 | - } |
|
100 | - } |
|
101 | - } |
|
102 | - if (apply_filters('FHEE__EE_Network_Config___load_config__update_network_config', false)) { |
|
103 | - $this->update_config(); |
|
104 | - } |
|
105 | - |
|
106 | - // load network config end hook |
|
107 | - do_action('AHEE__EE_Network_Config___load_config__end', $this); |
|
108 | - } |
|
109 | - |
|
110 | - |
|
111 | - /** |
|
112 | - * get_config |
|
113 | - * |
|
114 | - * @return array of network config stuff |
|
115 | - */ |
|
116 | - public function get_config() |
|
117 | - { |
|
118 | - // grab network configuration |
|
119 | - $CFG = get_site_option('ee_network_config', array()); |
|
120 | - $CFG = apply_filters('FHEE__EE_Network_Config__get_config__CFG', $CFG); |
|
121 | - return $CFG; |
|
122 | - } |
|
123 | - |
|
124 | - |
|
125 | - /** |
|
126 | - * update_config |
|
127 | - * |
|
128 | - * @param bool $add_success |
|
129 | - * @param bool $add_error |
|
130 | - * @return bool success |
|
131 | - */ |
|
132 | - public function update_config($add_success = false, $add_error = true) |
|
133 | - { |
|
134 | - do_action('AHEE__EE_Network_Config__update_config__begin', $this); |
|
135 | - |
|
136 | - // need to bust cache for comparing original if this is a multisite install |
|
137 | - if (is_multisite()) { |
|
138 | - global $current_site; |
|
139 | - $cache_key = $current_site->id . ':ee_network_config'; |
|
140 | - wp_cache_delete($cache_key, 'site-options'); |
|
141 | - } |
|
142 | - |
|
143 | - // we have to compare existing saved config with config in memory because if there is no difference that means |
|
144 | - // that the method executed fine but there just was no update. WordPress doesn't distinguish between false because |
|
145 | - // there were 0 records updated because of no change vs false because some error produced problems with the update. |
|
146 | - $original = get_site_option('ee_network_config'); |
|
147 | - |
|
148 | - if ($original == $this) { |
|
149 | - return true; |
|
150 | - } |
|
151 | - // update |
|
152 | - $saved = update_site_option('ee_network_config', $this); |
|
153 | - |
|
154 | - do_action('AHEE__EE_Network_Config__update_config__end', $this, $saved); |
|
155 | - // if config remains the same or was updated successfully |
|
156 | - if ($saved) { |
|
157 | - if ($add_success) { |
|
158 | - $msg = is_multisite() ? __( |
|
159 | - 'The Event Espresso Network Configuration Settings have been successfully updated.', |
|
160 | - 'event_espresso' |
|
161 | - ) : __('Extra Event Espresso Configuration settings were successfully updated.', 'event_espresso'); |
|
162 | - EE_Error::add_success($msg); |
|
163 | - } |
|
164 | - return true; |
|
165 | - } |
|
166 | - if ($add_error) { |
|
167 | - $msg = is_multisite() ? __( |
|
168 | - 'The Event Espresso Network Configuration Settings were not updated.', |
|
169 | - 'event_espresso' |
|
170 | - ) : __('Extra Event Espresso Network Configuration settings were not updated.', 'event_espresso'); |
|
171 | - EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
|
172 | - } |
|
173 | - return false; |
|
174 | - } |
|
175 | - |
|
176 | - |
|
177 | - /** |
|
178 | - * __sleep |
|
179 | - * |
|
180 | - * @return array |
|
181 | - */ |
|
182 | - public function __sleep() |
|
183 | - { |
|
184 | - return apply_filters( |
|
185 | - 'FHEE__EE_Network_Config__sleep', |
|
186 | - array( |
|
187 | - 'core', |
|
188 | - ) |
|
189 | - ); |
|
190 | - } |
|
17 | + /** |
|
18 | + * @var EE_Network_Config $_instance |
|
19 | + */ |
|
20 | + private static $_instance; |
|
21 | + |
|
22 | + /** |
|
23 | + * addons can add their specific network_config objects to this property |
|
24 | + * |
|
25 | + * @var EE_Config_Base[] $addons |
|
26 | + */ |
|
27 | + public $addons; |
|
28 | + |
|
29 | + /** |
|
30 | + * @var EE_Network_Core_Config $core |
|
31 | + */ |
|
32 | + public $core; |
|
33 | + |
|
34 | + |
|
35 | + /** |
|
36 | + * @singleton method used to instantiate class object |
|
37 | + * @return EE_Network_Config instance |
|
38 | + */ |
|
39 | + public static function instance() |
|
40 | + { |
|
41 | + // check if class object is instantiated, and instantiated properly |
|
42 | + if (! self::$_instance instanceof EE_Network_Config) { |
|
43 | + self::$_instance = new self(); |
|
44 | + } |
|
45 | + return self::$_instance; |
|
46 | + } |
|
47 | + |
|
48 | + |
|
49 | + /** |
|
50 | + * class constructor |
|
51 | + */ |
|
52 | + private function __construct() |
|
53 | + { |
|
54 | + do_action('AHEE__EE_Network_Config__construct__begin', $this); |
|
55 | + // set defaults |
|
56 | + $this->core = apply_filters('FHEE__EE_Network_Config___construct__core', new EE_Network_Core_Config()); |
|
57 | + $this->addons = array(); |
|
58 | + |
|
59 | + $this->_load_config(); |
|
60 | + |
|
61 | + // construct__end hook |
|
62 | + do_action('AHEE__EE_Network_Config__construct__end', $this); |
|
63 | + } |
|
64 | + |
|
65 | + |
|
66 | + /** |
|
67 | + * load EE Network Config options |
|
68 | + * |
|
69 | + * @return void |
|
70 | + */ |
|
71 | + private function _load_config() |
|
72 | + { |
|
73 | + // load network config start hook |
|
74 | + do_action('AHEE__EE_Network_Config___load_config__start', $this); |
|
75 | + $config = $this->get_config(); |
|
76 | + foreach ($config as $config_prop => $settings) { |
|
77 | + if ($config_prop === 'core' && ! $settings instanceof EE_Network_Core_Config) { |
|
78 | + $core = new EE_Network_Core_Config(); |
|
79 | + foreach ($settings as $prop => $setting) { |
|
80 | + if (property_exists($core, $prop)) { |
|
81 | + $core->{$prop} = $setting; |
|
82 | + } |
|
83 | + } |
|
84 | + $settings = $core; |
|
85 | + add_filter('FHEE__EE_Network_Config___load_config__update_network_config', '__return_true'); |
|
86 | + } |
|
87 | + if (is_object($settings) && property_exists($this, $config_prop)) { |
|
88 | + $this->{$config_prop} = apply_filters( |
|
89 | + 'FHEE__EE_Network_Config___load_config__config_settings', |
|
90 | + $settings, |
|
91 | + $config_prop, |
|
92 | + $this |
|
93 | + ); |
|
94 | + if (method_exists($settings, 'populate')) { |
|
95 | + $this->{$config_prop}->populate(); |
|
96 | + } |
|
97 | + if (method_exists($settings, 'do_hooks')) { |
|
98 | + $this->{$config_prop}->do_hooks(); |
|
99 | + } |
|
100 | + } |
|
101 | + } |
|
102 | + if (apply_filters('FHEE__EE_Network_Config___load_config__update_network_config', false)) { |
|
103 | + $this->update_config(); |
|
104 | + } |
|
105 | + |
|
106 | + // load network config end hook |
|
107 | + do_action('AHEE__EE_Network_Config___load_config__end', $this); |
|
108 | + } |
|
109 | + |
|
110 | + |
|
111 | + /** |
|
112 | + * get_config |
|
113 | + * |
|
114 | + * @return array of network config stuff |
|
115 | + */ |
|
116 | + public function get_config() |
|
117 | + { |
|
118 | + // grab network configuration |
|
119 | + $CFG = get_site_option('ee_network_config', array()); |
|
120 | + $CFG = apply_filters('FHEE__EE_Network_Config__get_config__CFG', $CFG); |
|
121 | + return $CFG; |
|
122 | + } |
|
123 | + |
|
124 | + |
|
125 | + /** |
|
126 | + * update_config |
|
127 | + * |
|
128 | + * @param bool $add_success |
|
129 | + * @param bool $add_error |
|
130 | + * @return bool success |
|
131 | + */ |
|
132 | + public function update_config($add_success = false, $add_error = true) |
|
133 | + { |
|
134 | + do_action('AHEE__EE_Network_Config__update_config__begin', $this); |
|
135 | + |
|
136 | + // need to bust cache for comparing original if this is a multisite install |
|
137 | + if (is_multisite()) { |
|
138 | + global $current_site; |
|
139 | + $cache_key = $current_site->id . ':ee_network_config'; |
|
140 | + wp_cache_delete($cache_key, 'site-options'); |
|
141 | + } |
|
142 | + |
|
143 | + // we have to compare existing saved config with config in memory because if there is no difference that means |
|
144 | + // that the method executed fine but there just was no update. WordPress doesn't distinguish between false because |
|
145 | + // there were 0 records updated because of no change vs false because some error produced problems with the update. |
|
146 | + $original = get_site_option('ee_network_config'); |
|
147 | + |
|
148 | + if ($original == $this) { |
|
149 | + return true; |
|
150 | + } |
|
151 | + // update |
|
152 | + $saved = update_site_option('ee_network_config', $this); |
|
153 | + |
|
154 | + do_action('AHEE__EE_Network_Config__update_config__end', $this, $saved); |
|
155 | + // if config remains the same or was updated successfully |
|
156 | + if ($saved) { |
|
157 | + if ($add_success) { |
|
158 | + $msg = is_multisite() ? __( |
|
159 | + 'The Event Espresso Network Configuration Settings have been successfully updated.', |
|
160 | + 'event_espresso' |
|
161 | + ) : __('Extra Event Espresso Configuration settings were successfully updated.', 'event_espresso'); |
|
162 | + EE_Error::add_success($msg); |
|
163 | + } |
|
164 | + return true; |
|
165 | + } |
|
166 | + if ($add_error) { |
|
167 | + $msg = is_multisite() ? __( |
|
168 | + 'The Event Espresso Network Configuration Settings were not updated.', |
|
169 | + 'event_espresso' |
|
170 | + ) : __('Extra Event Espresso Network Configuration settings were not updated.', 'event_espresso'); |
|
171 | + EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__); |
|
172 | + } |
|
173 | + return false; |
|
174 | + } |
|
175 | + |
|
176 | + |
|
177 | + /** |
|
178 | + * __sleep |
|
179 | + * |
|
180 | + * @return array |
|
181 | + */ |
|
182 | + public function __sleep() |
|
183 | + { |
|
184 | + return apply_filters( |
|
185 | + 'FHEE__EE_Network_Config__sleep', |
|
186 | + array( |
|
187 | + 'core', |
|
188 | + ) |
|
189 | + ); |
|
190 | + } |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | |
@@ -197,27 +197,27 @@ discard block |
||
197 | 197 | class EE_Network_Core_Config extends EE_Config_Base |
198 | 198 | { |
199 | 199 | |
200 | - /** |
|
201 | - * PUE site license key |
|
202 | - * |
|
203 | - * @var string $site_license_key |
|
204 | - */ |
|
205 | - public $site_license_key; |
|
206 | - |
|
207 | - /** |
|
208 | - * This indicates whether messages system processing should be done on the same request or not. |
|
209 | - * |
|
210 | - * @var boolean $do_messages_on_same_request |
|
211 | - */ |
|
212 | - public $do_messages_on_same_request; |
|
213 | - |
|
214 | - |
|
215 | - /** |
|
216 | - * EE_Network_Core_Config constructor. |
|
217 | - */ |
|
218 | - public function __construct() |
|
219 | - { |
|
220 | - $this->site_license_key = ''; |
|
221 | - $this->do_messages_on_same_request = false; |
|
222 | - } |
|
200 | + /** |
|
201 | + * PUE site license key |
|
202 | + * |
|
203 | + * @var string $site_license_key |
|
204 | + */ |
|
205 | + public $site_license_key; |
|
206 | + |
|
207 | + /** |
|
208 | + * This indicates whether messages system processing should be done on the same request or not. |
|
209 | + * |
|
210 | + * @var boolean $do_messages_on_same_request |
|
211 | + */ |
|
212 | + public $do_messages_on_same_request; |
|
213 | + |
|
214 | + |
|
215 | + /** |
|
216 | + * EE_Network_Core_Config constructor. |
|
217 | + */ |
|
218 | + public function __construct() |
|
219 | + { |
|
220 | + $this->site_license_key = ''; |
|
221 | + $this->do_messages_on_same_request = false; |
|
222 | + } |
|
223 | 223 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public static function instance() |
40 | 40 | { |
41 | 41 | // check if class object is instantiated, and instantiated properly |
42 | - if (! self::$_instance instanceof EE_Network_Config) { |
|
42 | + if ( ! self::$_instance instanceof EE_Network_Config) { |
|
43 | 43 | self::$_instance = new self(); |
44 | 44 | } |
45 | 45 | return self::$_instance; |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | // need to bust cache for comparing original if this is a multisite install |
137 | 137 | if (is_multisite()) { |
138 | 138 | global $current_site; |
139 | - $cache_key = $current_site->id . ':ee_network_config'; |
|
139 | + $cache_key = $current_site->id.':ee_network_config'; |
|
140 | 140 | wp_cache_delete($cache_key, 'site-options'); |
141 | 141 | } |
142 | 142 |
@@ -12,42 +12,42 @@ |
||
12 | 12 | */ |
13 | 13 | interface BlockAssetManagerInterface |
14 | 14 | { |
15 | - /** |
|
16 | - * @since 4.9.71.p |
|
17 | - * @return string |
|
18 | - */ |
|
19 | - public function assetNamespace(); |
|
20 | - |
|
21 | - /** |
|
22 | - * @since 4.9.71.p |
|
23 | - * @return void |
|
24 | - */ |
|
25 | - public function setAssetHandles(); |
|
26 | - |
|
27 | - /** |
|
28 | - * @since 4.9.71.p |
|
29 | - * @return string |
|
30 | - */ |
|
31 | - public function getEditorScriptHandle(); |
|
32 | - |
|
33 | - |
|
34 | - /** |
|
35 | - * @since 4.9.71.p |
|
36 | - * @return string |
|
37 | - */ |
|
38 | - public function getEditorStyleHandle(); |
|
39 | - |
|
40 | - |
|
41 | - /** |
|
42 | - * @since 4.9.71.p |
|
43 | - * @return string |
|
44 | - */ |
|
45 | - public function getScriptHandle(); |
|
46 | - |
|
47 | - |
|
48 | - /** |
|
49 | - * @since 4.9.71.p |
|
50 | - * @return string |
|
51 | - */ |
|
52 | - public function getStyleHandle(); |
|
15 | + /** |
|
16 | + * @since 4.9.71.p |
|
17 | + * @return string |
|
18 | + */ |
|
19 | + public function assetNamespace(); |
|
20 | + |
|
21 | + /** |
|
22 | + * @since 4.9.71.p |
|
23 | + * @return void |
|
24 | + */ |
|
25 | + public function setAssetHandles(); |
|
26 | + |
|
27 | + /** |
|
28 | + * @since 4.9.71.p |
|
29 | + * @return string |
|
30 | + */ |
|
31 | + public function getEditorScriptHandle(); |
|
32 | + |
|
33 | + |
|
34 | + /** |
|
35 | + * @since 4.9.71.p |
|
36 | + * @return string |
|
37 | + */ |
|
38 | + public function getEditorStyleHandle(); |
|
39 | + |
|
40 | + |
|
41 | + /** |
|
42 | + * @since 4.9.71.p |
|
43 | + * @return string |
|
44 | + */ |
|
45 | + public function getScriptHandle(); |
|
46 | + |
|
47 | + |
|
48 | + /** |
|
49 | + * @since 4.9.71.p |
|
50 | + * @return string |
|
51 | + */ |
|
52 | + public function getStyleHandle(); |
|
53 | 53 | } |
54 | 54 | \ No newline at end of file |
@@ -15,16 +15,16 @@ |
||
15 | 15 | */ |
16 | 16 | interface DependencyResolverInterface |
17 | 17 | { |
18 | - /** |
|
19 | - * Used to configure and/or setup any aliases or recursions required by the DependencyResolver |
|
20 | - * |
|
21 | - * @since 4.9.71.p |
|
22 | - */ |
|
23 | - public function initialize(); |
|
18 | + /** |
|
19 | + * Used to configure and/or setup any aliases or recursions required by the DependencyResolver |
|
20 | + * |
|
21 | + * @since 4.9.71.p |
|
22 | + */ |
|
23 | + public function initialize(); |
|
24 | 24 | |
25 | - /** |
|
26 | - * @param string $fqcn Fully Qualified Class Name |
|
27 | - * @since 4.9.71.p |
|
28 | - */ |
|
29 | - public function resolveDependenciesForClass($fqcn); |
|
25 | + /** |
|
26 | + * @param string $fqcn Fully Qualified Class Name |
|
27 | + * @since 4.9.71.p |
|
28 | + */ |
|
29 | + public function resolveDependenciesForClass($fqcn); |
|
30 | 30 | } |
@@ -18,61 +18,61 @@ |
||
18 | 18 | */ |
19 | 19 | class RestIncomingQueryParamContext |
20 | 20 | { |
21 | - /** |
|
22 | - * @var EEM_Base |
|
23 | - */ |
|
24 | - private $model; |
|
25 | - /** |
|
26 | - * @var string |
|
27 | - */ |
|
28 | - private $requested_version; |
|
29 | - /** |
|
30 | - * @var boolean |
|
31 | - */ |
|
32 | - private $writing; |
|
21 | + /** |
|
22 | + * @var EEM_Base |
|
23 | + */ |
|
24 | + private $model; |
|
25 | + /** |
|
26 | + * @var string |
|
27 | + */ |
|
28 | + private $requested_version; |
|
29 | + /** |
|
30 | + * @var boolean |
|
31 | + */ |
|
32 | + private $writing; |
|
33 | 33 | |
34 | - /** |
|
35 | - * RestIncomingQueryParamContext constructor. |
|
36 | - * @param EEM_Base $model |
|
37 | - * @param string $requested_version |
|
38 | - * @param boolean $writing |
|
39 | - */ |
|
40 | - public function __construct(EEM_Base $model, $requested_version, $writing) |
|
41 | - { |
|
42 | - $this->model = $model; |
|
43 | - $this->requested_version = (string) $requested_version; |
|
44 | - $this->writing = filter_var($writing, FILTER_VALIDATE_BOOLEAN); |
|
45 | - } |
|
34 | + /** |
|
35 | + * RestIncomingQueryParamContext constructor. |
|
36 | + * @param EEM_Base $model |
|
37 | + * @param string $requested_version |
|
38 | + * @param boolean $writing |
|
39 | + */ |
|
40 | + public function __construct(EEM_Base $model, $requested_version, $writing) |
|
41 | + { |
|
42 | + $this->model = $model; |
|
43 | + $this->requested_version = (string) $requested_version; |
|
44 | + $this->writing = filter_var($writing, FILTER_VALIDATE_BOOLEAN); |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * Gets the model currently being requested, eg class EEM_Event |
|
49 | - * @since 4.9.72.p |
|
50 | - * @return EEM_Base |
|
51 | - */ |
|
52 | - public function getModel() |
|
53 | - { |
|
54 | - return $this->model; |
|
55 | - } |
|
47 | + /** |
|
48 | + * Gets the model currently being requested, eg class EEM_Event |
|
49 | + * @since 4.9.72.p |
|
50 | + * @return EEM_Base |
|
51 | + */ |
|
52 | + public function getModel() |
|
53 | + { |
|
54 | + return $this->model; |
|
55 | + } |
|
56 | 56 | |
57 | - /** |
|
58 | - * Gets the version being requested, eg 4.8.36 |
|
59 | - * @since 4.9.72.p |
|
60 | - * @return string |
|
61 | - */ |
|
62 | - public function getRequestedVersion() |
|
63 | - { |
|
64 | - return $this->requested_version; |
|
65 | - } |
|
57 | + /** |
|
58 | + * Gets the version being requested, eg 4.8.36 |
|
59 | + * @since 4.9.72.p |
|
60 | + * @return string |
|
61 | + */ |
|
62 | + public function getRequestedVersion() |
|
63 | + { |
|
64 | + return $this->requested_version; |
|
65 | + } |
|
66 | 66 | |
67 | - /** |
|
68 | - * Gets if the current request is for a writing request or just simple read |
|
69 | - * @since 4.9.72.p |
|
70 | - * @return bool |
|
71 | - */ |
|
72 | - public function isWriting() |
|
73 | - { |
|
74 | - return $this->writing; |
|
75 | - } |
|
67 | + /** |
|
68 | + * Gets if the current request is for a writing request or just simple read |
|
69 | + * @since 4.9.72.p |
|
70 | + * @return bool |
|
71 | + */ |
|
72 | + public function isWriting() |
|
73 | + { |
|
74 | + return $this->writing; |
|
75 | + } |
|
76 | 76 | } |
77 | 77 | // End of file RestIncomingQueryParamContext.php |
78 | 78 | // Location: EventEspresso\core\libraries\rest_api/RestIncomingQueryParamContext.php |