/** * Gets the fulll record when a specific * party has been identified. * * @param int $party_id * @return stdClass */ public function preparePartyRecord($party_id) { require_once APPLICATION_PATH . MODEL_DIR . '/Presenter.php'; require_once APPLICATION_PATH . MODEL_DIR . '/User.php'; require_once APPLICATION_PATH . MODEL_DIR . '/Order.php'; $result = new stdClass(); //get party table info $result->party = $this->getDataById($party_id); $party_ids = array($party_id); $party1 = $this->_getSearchResults($party_ids); $result->points_total = $party1[0]->point_total; //get presenter info $presenter = new Presenter(); $presenter_sequence_id = $presenter->getSequenceIdById($result->party->presenter_id); $result->presenter = $presenter->getPresenterBySequenceId($presenter_sequence_id); //get hostess info $hostess = new User(); $result->hostess = $hostess->getDataById($result->party->hostess_id); //get orders info $order = new Order(); $result->orders = $order->loadOrdersByPartyId($party_id); return $result; }