@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION')) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('No direct script access allowed'); |
4 | 4 | |
5 | 5 | |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | * classname to create an alternative index for retrieving data_handlers. |
27 | 27 | * @return bool |
28 | 28 | */ |
29 | - public function add( $data_handler, $data = null) { |
|
29 | + public function add($data_handler, $data = null) { |
|
30 | 30 | $data = $data === null ? array() : (array) $data; |
31 | - $info['key'] = $this->get_key( get_class( $data_handler ), $data ); |
|
32 | - return parent::add( $data_handler, $info ); |
|
31 | + $info['key'] = $this->get_key(get_class($data_handler), $data); |
|
32 | + return parent::add($data_handler, $info); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @return string md5 hash using provided info. |
46 | 46 | */ |
47 | - public function get_key( $classname, $data ) { |
|
48 | - return md5( $classname . print_r( $data, true ) ); |
|
47 | + public function get_key($classname, $data) { |
|
48 | + return md5($classname.print_r($data, true)); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
@@ -61,11 +61,11 @@ discard block |
||
61 | 61 | * |
62 | 62 | * @return null|EE_Messages_incoming_data |
63 | 63 | */ |
64 | - public function get_by_key( $key ) { |
|
64 | + public function get_by_key($key) { |
|
65 | 65 | $this->rewind(); |
66 | - while( $this->valid() ) { |
|
66 | + while ($this->valid()) { |
|
67 | 67 | $data = $this->getInfo(); |
68 | - if ( isset( $data['key'] ) && $data['key'] === $key ) { |
|
68 | + if (isset($data['key']) && $data['key'] === $key) { |
|
69 | 69 | $handler = $this->current(); |
70 | 70 | $this->rewind(); |
71 | 71 | return $handler; |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION')) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | 3 | exit('No direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | |
6 | 7 | /** |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION')) |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
3 | 3 | exit('No direct script access allowed'); |
4 | 4 | |
5 | 5 | |
@@ -17,10 +17,10 @@ discard block |
||
17 | 17 | $this->interface = 'EE_Messages_Template_Pack'; |
18 | 18 | } |
19 | 19 | |
20 | - public function get_by_name( $template_pack_name ) { |
|
20 | + public function get_by_name($template_pack_name) { |
|
21 | 21 | $this->rewind(); |
22 | - while ( $this->valid() ) { |
|
23 | - if ( $this->current()->dbref == $template_pack_name ) { |
|
22 | + while ($this->valid()) { |
|
23 | + if ($this->current()->dbref == $template_pack_name) { |
|
24 | 24 | return $this->current(); |
25 | 25 | } |
26 | 26 | $this->next(); |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION')) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | 3 | exit('No direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | |
6 | 7 | /** |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | * |
33 | 33 | * @param EE_Messenger_Collection $messengers |
34 | 34 | */ |
35 | - public function __construct( EE_Messenger_Collection $messengers ) { |
|
36 | - $this->set_messenger_collection( $messengers ); |
|
35 | + public function __construct(EE_Messenger_Collection $messengers) { |
|
36 | + $this->set_messenger_collection($messengers); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * @param mixed $messengers |
52 | 52 | */ |
53 | - public function set_messenger_collection( EE_Messenger_Collection $messengers ) { |
|
53 | + public function set_messenger_collection(EE_Messenger_Collection $messengers) { |
|
54 | 54 | $this->_messenger_collection = $messengers; |
55 | 55 | } |
56 | 56 | |
@@ -63,41 +63,41 @@ discard block |
||
63 | 63 | * @param string $folder |
64 | 64 | * @throws \EE_Error |
65 | 65 | */ |
66 | - public function load_messengers_from_folder( $folder = '' ) { |
|
66 | + public function load_messengers_from_folder($folder = '') { |
|
67 | 67 | //make sure autoloaders are set (fail-safe) |
68 | 68 | EED_Messages::set_autoloaders(); |
69 | - $folder = ! empty( $folder ) ? $folder : EE_LIBRARIES . 'messages' . DS . 'messenger'; |
|
70 | - $folder .= $folder[ strlen( $folder ) - 1 ] != DS ? DS : ''; |
|
69 | + $folder = ! empty($folder) ? $folder : EE_LIBRARIES.'messages'.DS.'messenger'; |
|
70 | + $folder .= $folder[strlen($folder) - 1] != DS ? DS : ''; |
|
71 | 71 | // get all the files in that folder that end in ".class.php |
72 | 72 | $filepaths = apply_filters( |
73 | 73 | 'FHEE__EE_messages__get_installed__messenger_files', |
74 | - glob( $folder . '*.class.php' ) |
|
74 | + glob($folder.'*.class.php') |
|
75 | 75 | ); |
76 | - if ( empty( $filepaths ) ) { |
|
76 | + if (empty($filepaths)) { |
|
77 | 77 | return; |
78 | 78 | } |
79 | - foreach ( (array) $filepaths as $file_path ) { |
|
79 | + foreach ((array) $filepaths as $file_path) { |
|
80 | 80 | // extract filename from path |
81 | - $file_path = basename( $file_path ); |
|
81 | + $file_path = basename($file_path); |
|
82 | 82 | // now remove any file extensions |
83 | - $messenger_class_name = substr( $file_path, 0, strpos( $file_path, '.' ) ); |
|
83 | + $messenger_class_name = substr($file_path, 0, strpos($file_path, '.')); |
|
84 | 84 | |
85 | 85 | //first check to see if the class name represents an actual messenger class. |
86 | - if ( strpos( strtolower( $messenger_class_name ), 'messenger' ) === false ) { |
|
86 | + if (strpos(strtolower($messenger_class_name), 'messenger') === false) { |
|
87 | 87 | continue; |
88 | 88 | } |
89 | 89 | |
90 | - if ( ! class_exists( $messenger_class_name ) ) { |
|
90 | + if ( ! class_exists($messenger_class_name)) { |
|
91 | 91 | throw new EE_Error( |
92 | 92 | sprintf( |
93 | - __( 'The "%1$s" messenger class can\'t be loaded from %2$s. Likely there is a typo in the class name or the file name.', 'event_espresso' ), |
|
93 | + __('The "%1$s" messenger class can\'t be loaded from %2$s. Likely there is a typo in the class name or the file name.', 'event_espresso'), |
|
94 | 94 | $messenger_class_name, |
95 | 95 | $file_path |
96 | 96 | ) |
97 | 97 | ); |
98 | 98 | } |
99 | 99 | |
100 | - $this->_load_messenger( new $messenger_class_name() ); |
|
100 | + $this->_load_messenger(new $messenger_class_name()); |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | |
@@ -113,10 +113,10 @@ discard block |
||
113 | 113 | EED_Messages::set_autoloaders(); |
114 | 114 | $active_messengers = apply_filters( |
115 | 115 | 'FHEE__EEH_MSG_Template__get_active_messengers_in_db', |
116 | - get_option( 'ee_active_messengers', array() ) |
|
116 | + get_option('ee_active_messengers', array()) |
|
117 | 117 | ); |
118 | - foreach ( (array) $active_messengers as $active_messenger_classname => $active_messenger ) { |
|
119 | - $this->_load_messenger( $active_messenger ); |
|
118 | + foreach ((array) $active_messengers as $active_messenger_classname => $active_messenger) { |
|
119 | + $this->_load_messenger($active_messenger); |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 | |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | * @param \EE_messenger $messenger |
129 | 129 | * @return bool |
130 | 130 | */ |
131 | - protected function _load_messenger( EE_messenger $messenger ) { |
|
132 | - if ( $this->messenger_collection()->has_by_name( $messenger->name ) ) { |
|
131 | + protected function _load_messenger(EE_messenger $messenger) { |
|
132 | + if ($this->messenger_collection()->has_by_name($messenger->name)) { |
|
133 | 133 | return true; |
134 | 134 | } |
135 | 135 | return $this->messenger_collection()->add( |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -29,20 +29,20 @@ discard block |
||
29 | 29 | * @param EE_Registration|array $data |
30 | 30 | * @throws \EE_Error |
31 | 31 | */ |
32 | - public function __construct( $data ) { |
|
32 | + public function __construct($data) { |
|
33 | 33 | $filtered_reg_status = null; |
34 | 34 | |
35 | - if ( ! is_array( $data ) && $data instanceof EE_Registration ) { |
|
35 | + if ( ! is_array($data) && $data instanceof EE_Registration) { |
|
36 | 36 | $this->reg_obj = $data; |
37 | 37 | } else { |
38 | - $this->reg_obj = is_array( $data ) && isset( $data[0] ) && $data[0] instanceof EE_Registration ? $data[0] : null; |
|
39 | - $filtered_reg_status = is_array( $data ) && ! empty( $data[1] ) ? $data[1] : null; |
|
38 | + $this->reg_obj = is_array($data) && isset($data[0]) && $data[0] instanceof EE_Registration ? $data[0] : null; |
|
39 | + $filtered_reg_status = is_array($data) && ! empty($data[1]) ? $data[1] : null; |
|
40 | 40 | } |
41 | 41 | |
42 | - if ( ! $this->reg_obj instanceof EE_Registration ) { |
|
42 | + if ( ! $this->reg_obj instanceof EE_Registration) { |
|
43 | 43 | throw new EE_Error( |
44 | 44 | sprintf( |
45 | - __( '%1$s requires the incoming data argument to be an instance of %2$s or an array where the first value is an instance of %2$s', 'event_espresso'), |
|
45 | + __('%1$s requires the incoming data argument to be an instance of %2$s or an array where the first value is an instance of %2$s', 'event_espresso'), |
|
46 | 46 | 'EE_Messages_REG_incoming_data', |
47 | 47 | 'EE_Registration' |
48 | 48 | ) |
@@ -64,18 +64,18 @@ discard block |
||
64 | 64 | * |
65 | 65 | * @return array The prepped data for db |
66 | 66 | */ |
67 | - static public function convert_data_for_persistent_storage( $data ) { |
|
67 | + static public function convert_data_for_persistent_storage($data) { |
|
68 | 68 | $prepped_data = array(); |
69 | - if ( ! is_array( $data ) && $data instanceof EE_Registration ) { |
|
69 | + if ( ! is_array($data) && $data instanceof EE_Registration) { |
|
70 | 70 | $prepped_data['Registration'] = $data->ID(); |
71 | 71 | return $prepped_data; |
72 | - } elseif ( ! is_array( $data ) ) { |
|
72 | + } elseif ( ! is_array($data)) { |
|
73 | 73 | return array(); |
74 | 74 | } else { |
75 | - if ( $data[0] instanceof EE_Registration ) { |
|
75 | + if ($data[0] instanceof EE_Registration) { |
|
76 | 76 | $prepped_data['Registration'] = $data[0]; |
77 | 77 | } |
78 | - if ( ! empty( $data[1] ) ) { |
|
78 | + if ( ! empty($data[1])) { |
|
79 | 79 | $prepped_data['filter'] = $data[1]; |
80 | 80 | } |
81 | 81 | } |
@@ -91,17 +91,17 @@ discard block |
||
91 | 91 | * |
92 | 92 | * @return mixed |
93 | 93 | */ |
94 | - static public function convert_data_from_persistent_storage( $data ) { |
|
94 | + static public function convert_data_from_persistent_storage($data) { |
|
95 | 95 | $registration = null; |
96 | 96 | //$data['Registration'] could be either an ID (back compat) or a registration object (prepped using old system). |
97 | - if ( isset( $data[ 'Registration' ] ) ) { |
|
98 | - $registration = $data[ 'Registration' ] instanceof EE_Registration |
|
99 | - ? $data[ 'Registration' ] |
|
100 | - : EEM_Registration::instance()->get_one_by_ID( $data[ 'Registration' ] ); |
|
97 | + if (isset($data['Registration'])) { |
|
98 | + $registration = $data['Registration'] instanceof EE_Registration |
|
99 | + ? $data['Registration'] |
|
100 | + : EEM_Registration::instance()->get_one_by_ID($data['Registration']); |
|
101 | 101 | } |
102 | 102 | $prepped_data = array( |
103 | 103 | 0 => $registration, |
104 | - 1 => isset( $data['filter'] ) ? $data['filter'] : null |
|
104 | + 1 => isset($data['filter']) ? $data['filter'] : null |
|
105 | 105 | ); |
106 | 106 | return $prepped_data; |
107 | 107 | } |
@@ -119,18 +119,18 @@ discard block |
||
119 | 119 | $this->txn = $this->reg_obj->transaction(); |
120 | 120 | //possible session stuff? |
121 | 121 | $session = $this->txn->session_data(); |
122 | - $session_data = $session instanceof EE_Session ? $session->get_session_data() : array(); |
|
122 | + $session_data = $session instanceof EE_Session ? $session->get_session_data() : array(); |
|
123 | 123 | |
124 | 124 | //other data from the session (if possible) |
125 | - $this->user_id = isset( $session_data['user_id'] ) ? $session_data['user_id'] : ''; |
|
126 | - $this->ip_address = isset( $session_data['ip_address'] ) ? $session_data['ip_address'] : ''; |
|
127 | - $this->user_agent = isset( $session_data['user_agent'] ) ? $session_data['user_agent'] : ''; |
|
125 | + $this->user_id = isset($session_data['user_id']) ? $session_data['user_id'] : ''; |
|
126 | + $this->ip_address = isset($session_data['ip_address']) ? $session_data['ip_address'] : ''; |
|
127 | + $this->user_agent = isset($session_data['user_agent']) ? $session_data['user_agent'] : ''; |
|
128 | 128 | $this->init_access = $this->last_access = ''; |
129 | 129 | |
130 | 130 | $this->payment = $this->txn->get_first_related('Payment'); |
131 | 131 | // if there is no payments associated with the transaction |
132 | 132 | // then we just create a default payment object for potential parsing. |
133 | - $this->payment = empty( $this->payment ) |
|
133 | + $this->payment = empty($this->payment) |
|
134 | 134 | ? EE_Payment::new_instance( |
135 | 135 | array( |
136 | 136 | 'STS_ID' => EEM_Payment::status_id_pending, |
@@ -1,7 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | +} |
|
5 | 6 | |
6 | 7 | /** |
7 | 8 | * EE_Messages_REG_incoming_data |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'NO direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('NO direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | /** |
@@ -109,14 +109,14 @@ discard block |
||
109 | 109 | * about where to obtain the templates. |
110 | 110 | * |
111 | 111 | */ |
112 | - final private function _set_templates( $template_pack ) { |
|
112 | + final private function _set_templates($template_pack) { |
|
113 | 113 | |
114 | 114 | //get the corresponding template pack object (if present. If not then we just load the default and add a |
115 | 115 | //notice). The class name should be something like 'EE_Messages_Template_Pack_Default' where "default' would be |
116 | 116 | //the incoming template pack reference. |
117 | - $class_name = 'EE_Messages_Template_Pack_' . str_replace( ' ', '_', ucwords( str_replace( '_', ' ', $template_pack ) ) ); |
|
117 | + $class_name = 'EE_Messages_Template_Pack_'.str_replace(' ', '_', ucwords(str_replace('_', ' ', $template_pack))); |
|
118 | 118 | |
119 | - if ( ! class_exists( $class_name ) ) { |
|
119 | + if ( ! class_exists($class_name)) { |
|
120 | 120 | EE_Error::add_error( |
121 | 121 | sprintf( |
122 | 122 | __( |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $template_pack = new $class_name; |
136 | 136 | |
137 | 137 | //get all the templates from the template pack. |
138 | - $this->_templates = $template_pack->get_templates( $this->_messenger, $this->_message_type ); |
|
138 | + $this->_templates = $template_pack->get_templates($this->_messenger, $this->_message_type); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | |
@@ -159,15 +159,15 @@ discard block |
||
159 | 159 | public function create_new_templates() { |
160 | 160 | $template_pack = 'default'; |
161 | 161 | //if we have the GRP_ID then let's use that to see if there is a set template pack and use that for the new templates. |
162 | - if ( ! empty( $this->_GRP_ID ) ) { |
|
163 | - $message_template_group = $this->_message_template_group_model->get_one_by_ID( $this->_GRP_ID ); |
|
162 | + if ( ! empty($this->_GRP_ID)) { |
|
163 | + $message_template_group = $this->_message_template_group_model->get_one_by_ID($this->_GRP_ID); |
|
164 | 164 | $template_pack = $message_template_group instanceof EE_Message_Template_Group |
165 | 165 | ? $message_template_group->get_template_pack_name() |
166 | 166 | : 'default'; |
167 | 167 | //we also need to reset the template variation to default |
168 | - $message_template_group->set_template_pack_variation( 'default' ); |
|
168 | + $message_template_group->set_template_pack_variation('default'); |
|
169 | 169 | } |
170 | - return $this->_create_new_templates( $template_pack ); |
|
170 | + return $this->_create_new_templates($template_pack); |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | |
@@ -181,12 +181,12 @@ discard block |
||
181 | 181 | * which will contain information about where to obtain the templates. |
182 | 182 | * @return mixed (array|bool) success array or false. |
183 | 183 | */ |
184 | - protected function _create_new_templates( $template_pack ) { |
|
184 | + protected function _create_new_templates($template_pack) { |
|
185 | 185 | |
186 | - $this->_set_templates( $template_pack ); |
|
186 | + $this->_set_templates($template_pack); |
|
187 | 187 | |
188 | 188 | //necessary properties are set, let's save the default templates |
189 | - if ( empty( $this->_GRP_ID ) ) { |
|
189 | + if (empty($this->_GRP_ID)) { |
|
190 | 190 | $main_template_data = array( |
191 | 191 | 'MTP_messenger' => $this->_messenger->name, |
192 | 192 | 'MTP_message_type' => $this->_message_type->name, |
@@ -197,24 +197,24 @@ discard block |
||
197 | 197 | 'MTP_is_active' => 1, |
198 | 198 | ); |
199 | 199 | //let's insert the above and get our GRP_ID, then reset the template data array to just include the GRP_ID |
200 | - $grp_id = $this->_message_template_group_model->insert( $main_template_data ); |
|
201 | - if ( empty( $grp_id ) ) { |
|
200 | + $grp_id = $this->_message_template_group_model->insert($main_template_data); |
|
201 | + if (empty($grp_id)) { |
|
202 | 202 | return $grp_id; |
203 | 203 | } |
204 | 204 | $this->_GRP_ID = $grp_id; |
205 | 205 | } |
206 | 206 | |
207 | - $template_data = array( 'GRP_ID' => $this->_GRP_ID ); |
|
207 | + $template_data = array('GRP_ID' => $this->_GRP_ID); |
|
208 | 208 | |
209 | - foreach ( $this->_contexts as $context => $details ) { |
|
210 | - foreach ( $this->_fields as $field => $field_type ) { |
|
211 | - if ( $field != 'extra' ) { |
|
209 | + foreach ($this->_contexts as $context => $details) { |
|
210 | + foreach ($this->_fields as $field => $field_type) { |
|
211 | + if ($field != 'extra') { |
|
212 | 212 | $template_data['MTP_context'] = $context; |
213 | 213 | $template_data['MTP_template_field'] = $field; |
214 | - $template_data['MTP_content'] = $this->_templates[ $context ][ $field ]; |
|
214 | + $template_data['MTP_content'] = $this->_templates[$context][$field]; |
|
215 | 215 | |
216 | - $MTP = $this->_message_template_model->insert( $template_data ); |
|
217 | - if ( ! $MTP ) { |
|
216 | + $MTP = $this->_message_template_model->insert($template_data); |
|
217 | + if ( ! $MTP) { |
|
218 | 218 | EE_Error::add_error( |
219 | 219 | sprintf( |
220 | 220 | __( |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | return array( |
240 | 240 | 'GRP_ID' => $this->_GRP_ID, |
241 | - 'MTP_context' => key( $this->_contexts ) |
|
241 | + 'MTP_context' => key($this->_contexts) |
|
242 | 242 | ); |
243 | 243 | } |
244 | 244 |
@@ -6,22 +6,22 @@ |
||
6 | 6 | * @subpackage |
7 | 7 | * @author Mike Nelson |
8 | 8 | */ |
9 | -class EE_Email_Input extends EE_Form_Input_Base{ |
|
9 | +class EE_Email_Input extends EE_Form_Input_Base { |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * @param array $input_settings |
13 | 13 | */ |
14 | - function __construct( $input_settings = array() ){ |
|
15 | - $this->_set_display_strategy( new EE_Text_Input_Display_Strategy('email') ); |
|
16 | - $this->_set_normalization_strategy( new EE_Text_Normalization() ); |
|
14 | + function __construct($input_settings = array()) { |
|
15 | + $this->_set_display_strategy(new EE_Text_Input_Display_Strategy('email')); |
|
16 | + $this->_set_normalization_strategy(new EE_Text_Normalization()); |
|
17 | 17 | $this->_add_validation_strategy( |
18 | 18 | new EE_Email_Validation_Strategy( |
19 | - isset( $input_settings[ 'validation_error_message' ] ) |
|
20 | - ? $input_settings[ 'validation_error_message' ] |
|
19 | + isset($input_settings['validation_error_message']) |
|
20 | + ? $input_settings['validation_error_message'] |
|
21 | 21 | : NULL |
22 | 22 | ) |
23 | 23 | ); |
24 | - parent::__construct( $input_settings ); |
|
25 | - $this->set_html_class( $this->html_class() . ' email' ); |
|
24 | + parent::__construct($input_settings); |
|
25 | + $this->set_html_class($this->html_class().' email'); |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 | \ No newline at end of file |
@@ -32,73 +32,73 @@ |
||
32 | 32 | */ |
33 | 33 | class Socket |
34 | 34 | { |
35 | - private $handle = null; |
|
35 | + private $handle = null; |
|
36 | 36 | |
37 | - /** |
|
38 | - * fsockopen |
|
39 | - * |
|
40 | - * @see http://php.net/fsockopen |
|
41 | - * @param string $hostname |
|
42 | - * @param int $port |
|
43 | - * @param int $errno |
|
44 | - * @param string $errstr |
|
45 | - * @param float $timeout |
|
46 | - * @return resource |
|
47 | - */ |
|
48 | - public function fsockopen($hostname, $port = -1, &$errno = 0, &$errstr = '', $timeout = null) |
|
49 | - { |
|
50 | - $this->handle = fsockopen($hostname, $port, $errno, $errstr, (is_null($timeout) ? ini_get("default_socket_timeout") : $timeout)); |
|
37 | + /** |
|
38 | + * fsockopen |
|
39 | + * |
|
40 | + * @see http://php.net/fsockopen |
|
41 | + * @param string $hostname |
|
42 | + * @param int $port |
|
43 | + * @param int $errno |
|
44 | + * @param string $errstr |
|
45 | + * @param float $timeout |
|
46 | + * @return resource |
|
47 | + */ |
|
48 | + public function fsockopen($hostname, $port = -1, &$errno = 0, &$errstr = '', $timeout = null) |
|
49 | + { |
|
50 | + $this->handle = fsockopen($hostname, $port, $errno, $errstr, (is_null($timeout) ? ini_get("default_socket_timeout") : $timeout)); |
|
51 | 51 | |
52 | - if ($this->handle != false && $errno === 0 && $errstr === '') { |
|
53 | - return $this->handle; |
|
54 | - } else { |
|
55 | - return false; |
|
56 | - } |
|
57 | - } |
|
52 | + if ($this->handle != false && $errno === 0 && $errstr === '') { |
|
53 | + return $this->handle; |
|
54 | + } else { |
|
55 | + return false; |
|
56 | + } |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * fwrite |
|
61 | - * |
|
62 | - * @see http://php.net/fwrite |
|
63 | - * @param string $string |
|
64 | - * @param int $length |
|
65 | - * @return int | bool |
|
66 | - */ |
|
67 | - public function fwrite($string, $length = null) |
|
68 | - { |
|
69 | - return fwrite($this->handle, $string, (is_null($length) ? strlen($string) : $length)); |
|
70 | - } |
|
59 | + /** |
|
60 | + * fwrite |
|
61 | + * |
|
62 | + * @see http://php.net/fwrite |
|
63 | + * @param string $string |
|
64 | + * @param int $length |
|
65 | + * @return int | bool |
|
66 | + */ |
|
67 | + public function fwrite($string, $length = null) |
|
68 | + { |
|
69 | + return fwrite($this->handle, $string, (is_null($length) ? strlen($string) : $length)); |
|
70 | + } |
|
71 | 71 | |
72 | - /** |
|
73 | - * fgets |
|
74 | - * |
|
75 | - * @see http://php.net/fgets |
|
76 | - * @param int $length |
|
77 | - */ |
|
78 | - public function fgets($length = null) |
|
79 | - { |
|
80 | - return fgets($this->handle, $length); |
|
81 | - } |
|
72 | + /** |
|
73 | + * fgets |
|
74 | + * |
|
75 | + * @see http://php.net/fgets |
|
76 | + * @param int $length |
|
77 | + */ |
|
78 | + public function fgets($length = null) |
|
79 | + { |
|
80 | + return fgets($this->handle, $length); |
|
81 | + } |
|
82 | 82 | |
83 | - /** |
|
84 | - * feof |
|
85 | - * |
|
86 | - * @see http://php.net/feof |
|
87 | - * @return bool |
|
88 | - */ |
|
89 | - public function feof() |
|
90 | - { |
|
91 | - return feof($this->handle); |
|
92 | - } |
|
83 | + /** |
|
84 | + * feof |
|
85 | + * |
|
86 | + * @see http://php.net/feof |
|
87 | + * @return bool |
|
88 | + */ |
|
89 | + public function feof() |
|
90 | + { |
|
91 | + return feof($this->handle); |
|
92 | + } |
|
93 | 93 | |
94 | - /** |
|
95 | - * fclose |
|
96 | - * |
|
97 | - * @see http://php.net/fclose |
|
98 | - * @return bool |
|
99 | - */ |
|
100 | - public function fclose() |
|
101 | - { |
|
102 | - return fclose($this->handle); |
|
103 | - } |
|
94 | + /** |
|
95 | + * fclose |
|
96 | + * |
|
97 | + * @see http://php.net/fclose |
|
98 | + * @return bool |
|
99 | + */ |
|
100 | + public function fclose() |
|
101 | + { |
|
102 | + return fclose($this->handle); |
|
103 | + } |
|
104 | 104 | } |
@@ -347,7 +347,7 @@ |
||
347 | 347 | $total_ticket_count++; |
348 | 348 | $tickets[ $ticket->ID() ]['ticket'] = $ticket; |
349 | 349 | $tickets[ $ticket->ID() ]['count'] = is_array( $tickets[ $ticket->ID() ] ) |
350 | - && isset( $tickets[ $ticket->ID() ]['count'] ) |
|
350 | + && isset( $tickets[ $ticket->ID() ]['count'] ) |
|
351 | 351 | ? $tickets[ $ticket->ID() ]['count'] + 1 |
352 | 352 | : 1; |
353 | 353 | $tickets[ $ticket->ID() ]['att_objs'][ $reg->attendee_ID() ] = $reg->attendee(); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('NO direct script access allowed'); |
5 | 5 | |
6 | 6 | /** |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | * @param mixed $data incoming data object|array. Suggested that child classes use type hinting for expected |
267 | 267 | * data object. But here parent will be generic because we don't know what's coming in. |
268 | 268 | */ |
269 | - public function __construct( $data ) { |
|
269 | + public function __construct($data) { |
|
270 | 270 | $this->_data = $data; |
271 | 271 | $this->_setup_data(); |
272 | 272 | } |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | * |
289 | 289 | * @return mixed The prepped data for db |
290 | 290 | */ |
291 | - static public function convert_data_for_persistent_storage( $data ) { |
|
291 | + static public function convert_data_for_persistent_storage($data) { |
|
292 | 292 | return $data; |
293 | 293 | } |
294 | 294 | |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | * |
305 | 305 | * @return mixed |
306 | 306 | */ |
307 | - static public function convert_data_from_persistent_storage( $data ) { |
|
307 | + static public function convert_data_from_persistent_storage($data) { |
|
308 | 308 | return $data; |
309 | 309 | } |
310 | 310 | |
@@ -331,8 +331,8 @@ discard block |
||
331 | 331 | protected function _assemble_data() { |
332 | 332 | //verify that reg_objs is set |
333 | 333 | if ( |
334 | - ! is_array( $this->reg_objs ) |
|
335 | - && ! reset( $this->reg_objs ) instanceof EE_Registration |
|
334 | + ! is_array($this->reg_objs) |
|
335 | + && ! reset($this->reg_objs) instanceof EE_Registration |
|
336 | 336 | ) { |
337 | 337 | throw new EE_Error( |
338 | 338 | __( |
@@ -347,84 +347,84 @@ discard block |
||
347 | 347 | $answers = $questions = $attendees = $line_items = $registrations = array(); |
348 | 348 | $total_ticket_count = 0; |
349 | 349 | |
350 | - if ( ! empty( $this->reg_objs ) ) { |
|
350 | + if ( ! empty($this->reg_objs)) { |
|
351 | 351 | $event_attendee_count = array(); |
352 | - foreach ( $this->reg_objs as $reg ) { |
|
352 | + foreach ($this->reg_objs as $reg) { |
|
353 | 353 | |
354 | 354 | if ( |
355 | - $this->_skip_registration_for_processing( $reg ) |
|
355 | + $this->_skip_registration_for_processing($reg) |
|
356 | 356 | ) { |
357 | 357 | continue; |
358 | 358 | } |
359 | 359 | |
360 | 360 | $evt_id = $reg->event_ID(); |
361 | 361 | /** @type EE_Ticket $ticket */ |
362 | - $ticket = $reg->get_first_related( 'Ticket' ); |
|
362 | + $ticket = $reg->get_first_related('Ticket'); |
|
363 | 363 | $relateddatetime = $ticket->datetimes(); |
364 | 364 | $total_ticket_count++; |
365 | - $tickets[ $ticket->ID() ]['ticket'] = $ticket; |
|
366 | - $tickets[ $ticket->ID() ]['count'] = is_array( $tickets[ $ticket->ID() ] ) |
|
367 | - && isset( $tickets[ $ticket->ID() ]['count'] ) |
|
368 | - ? $tickets[ $ticket->ID() ]['count'] + 1 |
|
365 | + $tickets[$ticket->ID()]['ticket'] = $ticket; |
|
366 | + $tickets[$ticket->ID()]['count'] = is_array($tickets[$ticket->ID()]) |
|
367 | + && isset($tickets[$ticket->ID()]['count']) |
|
368 | + ? $tickets[$ticket->ID()]['count'] + 1 |
|
369 | 369 | : 1; |
370 | - $tickets[ $ticket->ID() ]['att_objs'][ $reg->attendee_ID() ] = $reg->attendee(); |
|
371 | - $tickets[ $ticket->ID() ]['dtt_objs'] = $relateddatetime; |
|
372 | - $tickets[ $ticket->ID() ]['reg_objs'][ $reg->ID() ] = $reg; |
|
370 | + $tickets[$ticket->ID()]['att_objs'][$reg->attendee_ID()] = $reg->attendee(); |
|
371 | + $tickets[$ticket->ID()]['dtt_objs'] = $relateddatetime; |
|
372 | + $tickets[$ticket->ID()]['reg_objs'][$reg->ID()] = $reg; |
|
373 | 373 | $event = $reg->event(); |
374 | - $tickets[ $ticket->ID() ]['EE_Event'] = $event; |
|
375 | - $evtcache[ $evt_id ] = $event; |
|
376 | - $eventsetup[ $evt_id ]['reg_objs'][ $reg->ID() ] = $reg; |
|
377 | - $eventsetup[ $evt_id ]['tkt_objs'][ $ticket->ID() ] = $ticket; |
|
378 | - $eventsetup[ $evt_id ]['att_objs'][ $reg->attendee_ID() ] = $reg->attendee(); |
|
379 | - $event_attendee_count[ $evt_id ] = isset( $event_attendee_count[ $evt_id ] ) |
|
380 | - ? $event_attendee_count[ $evt_id ] + 1 |
|
374 | + $tickets[$ticket->ID()]['EE_Event'] = $event; |
|
375 | + $evtcache[$evt_id] = $event; |
|
376 | + $eventsetup[$evt_id]['reg_objs'][$reg->ID()] = $reg; |
|
377 | + $eventsetup[$evt_id]['tkt_objs'][$ticket->ID()] = $ticket; |
|
378 | + $eventsetup[$evt_id]['att_objs'][$reg->attendee_ID()] = $reg->attendee(); |
|
379 | + $event_attendee_count[$evt_id] = isset($event_attendee_count[$evt_id]) |
|
380 | + ? $event_attendee_count[$evt_id] + 1 |
|
381 | 381 | : 0; |
382 | - $attendees[ $reg->attendee_ID() ]['line_ref'][] = $evt_id; |
|
383 | - $attendees[ $reg->attendee_ID() ]['att_obj'] = $reg->attendee(); |
|
384 | - $attendees[ $reg->attendee_ID() ]['reg_objs'][ $reg->ID() ] = $reg; |
|
382 | + $attendees[$reg->attendee_ID()]['line_ref'][] = $evt_id; |
|
383 | + $attendees[$reg->attendee_ID()]['att_obj'] = $reg->attendee(); |
|
384 | + $attendees[$reg->attendee_ID()]['reg_objs'][$reg->ID()] = $reg; |
|
385 | 385 | //$attendees[ $reg->attendee_ID() ]['registration_id'] = $reg->ID(); |
386 | - $attendees[ $reg->attendee_ID() ]['attendee_email'] = $reg->attendee() instanceof EE_Attendee |
|
386 | + $attendees[$reg->attendee_ID()]['attendee_email'] = $reg->attendee() instanceof EE_Attendee |
|
387 | 387 | ? $reg->attendee()->email() |
388 | 388 | : ''; |
389 | - $attendees[ $reg->attendee_ID() ]['tkt_objs'][ $ticket->ID() ] = $ticket; |
|
390 | - $attendees[ $reg->attendee_ID() ]['evt_objs'][ $evt_id ] = $event; |
|
389 | + $attendees[$reg->attendee_ID()]['tkt_objs'][$ticket->ID()] = $ticket; |
|
390 | + $attendees[$reg->attendee_ID()]['evt_objs'][$evt_id] = $event; |
|
391 | 391 | |
392 | 392 | //registrations |
393 | - $registrations[ $reg->ID() ]['tkt_obj'] = $ticket; |
|
394 | - $registrations[ $reg->ID() ]['evt_obj'] = $event; |
|
395 | - $registrations[ $reg->ID() ]['reg_obj'] = $reg; |
|
396 | - $registrations[ $reg->ID() ]['att_obj'] = $reg->attendee(); |
|
393 | + $registrations[$reg->ID()]['tkt_obj'] = $ticket; |
|
394 | + $registrations[$reg->ID()]['evt_obj'] = $event; |
|
395 | + $registrations[$reg->ID()]['reg_obj'] = $reg; |
|
396 | + $registrations[$reg->ID()]['att_obj'] = $reg->attendee(); |
|
397 | 397 | |
398 | 398 | //set up answer objects |
399 | - $rel_ans = $reg->get_many_related( 'Answer' ); |
|
400 | - foreach ( $rel_ans as $ansid => $answer ) { |
|
401 | - if ( ! isset( $questions[ $ansid ] ) ) { |
|
402 | - $questions[ $ansid ] = $answer->get_first_related( 'Question' ); |
|
399 | + $rel_ans = $reg->get_many_related('Answer'); |
|
400 | + foreach ($rel_ans as $ansid => $answer) { |
|
401 | + if ( ! isset($questions[$ansid])) { |
|
402 | + $questions[$ansid] = $answer->get_first_related('Question'); |
|
403 | 403 | } |
404 | - $answers[ $ansid ] = $answer; |
|
405 | - $registrations[ $reg->ID() ]['ans_objs'][ $ansid ] = $answer; |
|
404 | + $answers[$ansid] = $answer; |
|
405 | + $registrations[$reg->ID()]['ans_objs'][$ansid] = $answer; |
|
406 | 406 | } |
407 | 407 | |
408 | - foreach ( $relateddatetime as $dtt_id => $datetime ) { |
|
409 | - $eventsetup[ $evt_id ]['dtt_objs'][ $dtt_id ] = $datetime; |
|
410 | - $registrations[ $reg->ID() ]['dtt_objs'][ $dtt_id ] = $datetime; |
|
408 | + foreach ($relateddatetime as $dtt_id => $datetime) { |
|
409 | + $eventsetup[$evt_id]['dtt_objs'][$dtt_id] = $datetime; |
|
410 | + $registrations[$reg->ID()]['dtt_objs'][$dtt_id] = $datetime; |
|
411 | 411 | |
412 | - if ( isset( $datetimes[ $dtt_id ] ) ) { |
|
412 | + if (isset($datetimes[$dtt_id])) { |
|
413 | 413 | continue; //already have this info in the datetimes array. |
414 | 414 | } |
415 | 415 | |
416 | - $datetimes[ $dtt_id ]['tkt_objs'][] = $ticket; |
|
417 | - $datetimes[ $dtt_id ]['datetime'] = $datetime; |
|
418 | - $datetimes[ $dtt_id ]['evt_objs'][ $evt_id ] = $event; |
|
419 | - $datetimes[ $dtt_id ]['reg_objs'][ $reg->ID() ] = $reg; |
|
416 | + $datetimes[$dtt_id]['tkt_objs'][] = $ticket; |
|
417 | + $datetimes[$dtt_id]['datetime'] = $datetime; |
|
418 | + $datetimes[$dtt_id]['evt_objs'][$evt_id] = $event; |
|
419 | + $datetimes[$dtt_id]['reg_objs'][$reg->ID()] = $reg; |
|
420 | 420 | } |
421 | 421 | } |
422 | 422 | |
423 | 423 | //let's loop through the unique event=>reg items and setup data on them |
424 | 424 | |
425 | - if ( ! empty( $eventsetup ) ) { |
|
426 | - foreach ( $eventsetup as $evt_id => $items ) { |
|
427 | - if ( $this->txn instanceof EE_Transaction ) { |
|
425 | + if ( ! empty($eventsetup)) { |
|
426 | + foreach ($eventsetup as $evt_id => $items) { |
|
427 | + if ($this->txn instanceof EE_Transaction) { |
|
428 | 428 | $ticket_line_items_for_event = EEM_Line_Item::instance()->get_all( |
429 | 429 | array( |
430 | 430 | array( |
@@ -437,25 +437,25 @@ discard block |
||
437 | 437 | } else { |
438 | 438 | $ticket_line_items_for_event = array(); |
439 | 439 | } |
440 | - $events[ $evt_id ] = array( |
|
440 | + $events[$evt_id] = array( |
|
441 | 441 | 'ID' => $evt_id, |
442 | - 'event' => $evtcache[ $evt_id ], |
|
443 | - 'name' => $evtcache[ $evt_id ] instanceof EE_Event ? $evtcache[ $evt_id ]->name() : '', |
|
444 | - 'total_attendees' => $event_attendee_count[ $evt_id ], |
|
442 | + 'event' => $evtcache[$evt_id], |
|
443 | + 'name' => $evtcache[$evt_id] instanceof EE_Event ? $evtcache[$evt_id]->name() : '', |
|
444 | + 'total_attendees' => $event_attendee_count[$evt_id], |
|
445 | 445 | 'reg_objs' => $items['reg_objs'], |
446 | 446 | 'tkt_objs' => $items['tkt_objs'], |
447 | 447 | 'att_objs' => $items['att_objs'], |
448 | - 'dtt_objs' => isset( $items['dtt_objs'] ) ? $items['dtt_objs'] : array(), |
|
448 | + 'dtt_objs' => isset($items['dtt_objs']) ? $items['dtt_objs'] : array(), |
|
449 | 449 | 'line_items' => $ticket_line_items_for_event, |
450 | 450 | ); |
451 | 451 | |
452 | 452 | //make sure the tickets have the line items setup for them. |
453 | - foreach ( $ticket_line_items_for_event as $line_id => $line_item ) { |
|
454 | - if ( $line_item instanceof EE_Line_Item ) { |
|
455 | - $tickets[ $line_item->ticket()->ID() ]['line_item'] = $line_item; |
|
456 | - $tickets[ $line_item->ticket()->ID() ]['sub_line_items'] = $line_item->children(); |
|
457 | - $line_items[ $line_item->ID() ]['children'] = $line_item->children(); |
|
458 | - $line_items[ $line_item->ID() ]['EE_Ticket'] = $line_item->ticket(); |
|
453 | + foreach ($ticket_line_items_for_event as $line_id => $line_item) { |
|
454 | + if ($line_item instanceof EE_Line_Item) { |
|
455 | + $tickets[$line_item->ticket()->ID()]['line_item'] = $line_item; |
|
456 | + $tickets[$line_item->ticket()->ID()]['sub_line_items'] = $line_item->children(); |
|
457 | + $line_items[$line_item->ID()]['children'] = $line_item->children(); |
|
458 | + $line_items[$line_item->ID()]['EE_Ticket'] = $line_item->ticket(); |
|
459 | 459 | } |
460 | 460 | } |
461 | 461 | } |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | $this->total_ticket_count = $total_ticket_count; |
478 | 478 | $this->registrations = $registrations; |
479 | 479 | |
480 | - if ( $this->txn instanceof EE_Transaction ) { |
|
480 | + if ($this->txn instanceof EE_Transaction) { |
|
481 | 481 | $this->tax_line_items = $this->txn->tax_items(); |
482 | 482 | $this->additional_line_items = $this->txn->non_ticket_line_items(); |
483 | 483 | $this->payments = $this->txn->payments(); |
@@ -487,10 +487,10 @@ discard block |
||
487 | 487 | //let's get just the primary_attendee_data! First we get the primary registration object. |
488 | 488 | $primary_reg = $this->txn->primary_registration(); |
489 | 489 | // verify |
490 | - if ( $primary_reg instanceof EE_Registration ) { |
|
490 | + if ($primary_reg instanceof EE_Registration) { |
|
491 | 491 | |
492 | 492 | // get attendee object |
493 | - if ( $primary_reg->attendee() instanceof EE_Attendee ) { |
|
493 | + if ($primary_reg->attendee() instanceof EE_Attendee) { |
|
494 | 494 | |
495 | 495 | //now we can setup the primary_attendee_data array |
496 | 496 | $this->primary_attendee_data = array( |
@@ -534,8 +534,8 @@ discard block |
||
534 | 534 | * @return bool returning true means we DO want to skip processing. returning false means we DON'T want to skip |
535 | 535 | * processing |
536 | 536 | */ |
537 | - protected function _skip_registration_for_processing( EE_Registration $registration ) { |
|
538 | - if ( empty( $this->filtered_reg_status ) ) { |
|
537 | + protected function _skip_registration_for_processing(EE_Registration $registration) { |
|
538 | + if (empty($this->filtered_reg_status)) { |
|
539 | 539 | return false; |
540 | 540 | } |
541 | 541 |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
3 | 3 | exit('NO direct script access allowed'); |
4 | +} |
|
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Event Espresso |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | |
43 | 43 | public function __construct() { |
44 | 44 | // construct request stack and run middleware apps as soon as all WP plugins are loaded |
45 | - add_action( 'plugins_loaded', array( $this, 'run_request_stack' ), 0 ); |
|
45 | + add_action('plugins_loaded', array($this, 'run_request_stack'), 0); |
|
46 | 46 | // set framework for the rest of EE to hook into when loading |
47 | - add_action( 'plugins_loaded', array( 'EE_Bootstrap', 'load_espresso_addons' ), 1 ); |
|
48 | - add_action( 'plugins_loaded', array( 'EE_Bootstrap', 'detect_activations_or_upgrades' ), 3 ); |
|
49 | - add_action( 'plugins_loaded', array( 'EE_Bootstrap', 'load_core_configuration' ), 5 ); |
|
50 | - add_action( 'plugins_loaded', array( 'EE_Bootstrap', 'register_shortcodes_modules_and_widgets' ), 7 ); |
|
51 | - add_action( 'plugins_loaded', array( 'EE_Bootstrap', 'brew_espresso' ), 9 ); |
|
47 | + add_action('plugins_loaded', array('EE_Bootstrap', 'load_espresso_addons'), 1); |
|
48 | + add_action('plugins_loaded', array('EE_Bootstrap', 'detect_activations_or_upgrades'), 3); |
|
49 | + add_action('plugins_loaded', array('EE_Bootstrap', 'load_core_configuration'), 5); |
|
50 | + add_action('plugins_loaded', array('EE_Bootstrap', 'register_shortcodes_modules_and_widgets'), 7); |
|
51 | + add_action('plugins_loaded', array('EE_Bootstrap', 'brew_espresso'), 9); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | new EE_Load_Espresso_Core() |
66 | 66 | ); |
67 | 67 | $this->_request_stack->handle_request( |
68 | - new EE_Request( $_GET, $_POST, $_COOKIE ), |
|
68 | + new EE_Request($_GET, $_POST, $_COOKIE), |
|
69 | 69 | new EE_Response() |
70 | 70 | ); |
71 | 71 | $this->_request_stack->handle_response(); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | protected function load_autoloader() { |
80 | 80 | // load interfaces |
81 | - espresso_load_required( 'EEH_Autoloader', EE_CORE . 'helpers' . DS . 'EEH_Autoloader.helper.php' ); |
|
81 | + espresso_load_required('EEH_Autoloader', EE_CORE.'helpers'.DS.'EEH_Autoloader.helper.php'); |
|
82 | 82 | EEH_Autoloader::instance(); |
83 | 83 | } |
84 | 84 | |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | */ |
90 | 90 | protected function set_autoloaders_for_required_files() { |
91 | 91 | // load interfaces |
92 | - espresso_load_required( 'EEI_Interfaces', EE_CORE . 'interfaces' . DS . 'EEI_Interfaces.php' ); |
|
92 | + espresso_load_required('EEI_Interfaces', EE_CORE.'interfaces'.DS.'EEI_Interfaces.php'); |
|
93 | 93 | // load helpers |
94 | - EEH_Autoloader::register_autoloaders_for_each_file_in_folder( EE_HELPERS ); |
|
94 | + EEH_Autoloader::register_autoloaders_for_each_file_in_folder(EE_HELPERS); |
|
95 | 95 | // load request stack |
96 | - EEH_Autoloader::register_autoloaders_for_each_file_in_folder( EE_CORE . 'request_stack' . DS ); |
|
96 | + EEH_Autoloader::register_autoloaders_for_each_file_in_folder(EE_CORE.'request_stack'.DS); |
|
97 | 97 | // load middleware |
98 | - EEH_Autoloader::register_autoloaders_for_each_file_in_folder( EE_CORE . 'middleware' . DS ); |
|
98 | + EEH_Autoloader::register_autoloaders_for_each_file_in_folder(EE_CORE.'middleware'.DS); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | |
@@ -118,9 +118,9 @@ discard block |
||
118 | 118 | ) |
119 | 119 | ); |
120 | 120 | // load middleware onto stack : FILO (First In Last Out) |
121 | - foreach ( (array)$stack_apps as $stack_app ) { |
|
121 | + foreach ((array) $stack_apps as $stack_app) { |
|
122 | 122 | //$request_stack_builder->push( $stack_app ); |
123 | - $request_stack_builder->unshift( $stack_app ); |
|
123 | + $request_stack_builder->unshift($stack_app); |
|
124 | 124 | } |
125 | 125 | return apply_filters( |
126 | 126 | 'FHEE__EE_Bootstrap__build_request_stack__request_stack_builder', |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * no other logic should be performed at this point |
138 | 138 | */ |
139 | 139 | public static function load_espresso_addons() { |
140 | - do_action( 'AHEE__EE_Bootstrap__load_espresso_addons' ); |
|
140 | + do_action('AHEE__EE_Bootstrap__load_espresso_addons'); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * we can determine if anything needs activating or upgrading |
150 | 150 | */ |
151 | 151 | public static function detect_activations_or_upgrades() { |
152 | - do_action( 'AHEE__EE_Bootstrap__detect_activations_or_upgrades' ); |
|
152 | + do_action('AHEE__EE_Bootstrap__detect_activations_or_upgrades'); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | * we can load and set all of the system configurations |
162 | 162 | */ |
163 | 163 | public static function load_core_configuration() { |
164 | - do_action( 'AHEE__EE_Bootstrap__load_core_configuration' ); |
|
164 | + do_action('AHEE__EE_Bootstrap__load_core_configuration'); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * so that they are ready to be used throughout the system |
174 | 174 | */ |
175 | 175 | public static function register_shortcodes_modules_and_widgets() { |
176 | - do_action( 'AHEE__EE_Bootstrap__register_shortcodes_modules_and_widgets' ); |
|
176 | + do_action('AHEE__EE_Bootstrap__register_shortcodes_modules_and_widgets'); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | * so let the fun begin... |
186 | 186 | */ |
187 | 187 | public static function brew_espresso() { |
188 | - do_action( 'AHEE__EE_Bootstrap__brew_espresso' ); |
|
188 | + do_action('AHEE__EE_Bootstrap__brew_espresso'); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 |