get('_idorder'); if (empty($booking_id)) { $booking_id = $this->get('idorder'); } if (empty($booking_id)) { // useless to proceed if no reservation ID set return false; } // access any kind of object-property set $props = $this->getProperties($public = false); // convert "reserved" keys into "public" ones foreach ($props as $prop => $val) { if ('_' == substr($prop, 0, 1)) { $props[substr($prop, 1)] = $val; unset($props[$prop]); } } // get the notification displayer for "message" $displayer = VBONotificationBuilder::getInstance($props)->getDisplayer($this->_notification_type); if (!$displayer) { return false; } // build notification display data try { $display_data = $displayer->getData(); if (!$display_data) { throw new Exception('Error building the notification display data', 500); } } catch (Exception $e) { return false; } // set display data "public" properties foreach ($display_data as $prop_name => $prop_val) { $this->set($prop_name, $prop_val); } return true; } /** * This kind of notification will be returned inclusive of * display data for dispatching. It won't need to be built. * * @return null always null for never building this notification. */ protected function generateBuildUrl() { return null; } }