/** * @param $result * @return \App\Holder\PageRelated */ public function populate($result) { $holder = new \App\Holder\PageRelated(); if (isset($result["page_related_id_page_related"])) { $holder->setPageRelated(Service::populateEntity($result, \App\Model\PageRelated::getClassName(), "page_related")); } $page_a = new \App\Holder\Page(); if (isset($result["page_a_id_page"])) { $page_a->setPage(Service::populateEntity($result, \App\Model\Page::getClassName(), "page_a")); } if (isset($result["website_a_id_website"])) { $page_a->setWebsite(Service::populateEntity($result, \App\Model\Website::getClassName(), "website_a")); } if (isset($result["wireframe_a_id_wireframe"])) { $page_a->setCurrentWireframe(Service::populateEntity($result, \App\Model\Wireframe::getClassName(), "wireframe_a")); } $holder->setPageA($page_a); $page_b = new \App\Holder\Page(); if (isset($result["page_b_id_page"])) { $page_b->setPage(Service::populateEntity($result, \App\Model\Page::getClassName(), "page_b")); } if (isset($result["website_b_id_website"])) { $page_b->setWebsite(Service::populateEntity($result, \App\Model\Website::getClassName(), "website_b")); } if (isset($result["wireframe_b_id_wireframe"])) { $page_b->setCurrentWireframe(Service::populateEntity($result, \App\Model\Wireframe::getClassName(), "wireframe_b")); } $holder->setPageB($page_b); return $holder; }
/** * @param $result * @return IHolder */ public function populate($result) { $holder = new \App\Holder\Results\Base\Respondent(); if (isset($result["respondent_id_respondent"])) { $holder->setRespondent(Service::populateEntity($result, \App\Model\Respondent::getClassName(), "respondent")); } if (isset($result["total_questions"])) { $holder->setTotalQuestions((int) $result["total_questions"]); } if (isset($result["total_subquestions"])) { $holder->setTotalSubquestions((int) $result["total_subquestions"]); } if (isset($result["total_correct_subquestions"])) { $holder->setTotalCorrectSubquestions((int) $result["total_correct_subquestions"]); } if (isset($result["total_wrong_subquestions"])) { $holder->setTotalWrongSubquestions((int) $result["total_wrong_subquestions"]); } if (isset($result["total_almost_subquestions"])) { $holder->setTotalAlmostSubquestions((int) $result["total_almost_subquestions"]); } if (isset($result["total_unknown_subquestions"])) { $holder->setTotalUnknownSubquestions((int) $result["total_unknown_subquestions"]); } if (isset($result["total_disqualified_subquestions"])) { $holder->setTotalDisqualifiedSubquestions((int) $result["total_disqualified_subquestions"]); } if (isset($result["total_correct_subquestions_percents"])) { $holder->setTotalCorrectSubquestionsPercents((double) $result["total_correct_subquestions_percents"]); } return $holder; }
/** * @param $result * @return IHolder */ public function populate($result) { $holder = new \App\Holder\Results\Base\Website(); if (isset($result["website_id_website"])) { $holder->setWebsite(Service::populateEntity($result, \App\Model\Website::getClassName(), "website")); } if (isset($result["total_subquestions"])) { $holder->setTotalSubquestions((int) $result["total_subquestions"]); } if (isset($result["total_correct_subquestions"])) { $holder->setTotalCorrectSubquestions((int) $result["total_correct_subquestions"]); } if (isset($result["total_almost_subquestions"])) { $holder->setTotalAlmostSubquestions((int) $result["total_almost_subquestions"]); } if (isset($result["total_disqualified_subquestions"])) { $holder->setTotalDisqualifiedSubquestions((int) $result["total_disqualified_subquestions"]); } if (isset($result["total_wrong_subquestions"])) { $holder->setTotalWrongSubquestions((int) $result["total_wrong_subquestions"]); } if (isset($result["total_correct_subquestions_percents"])) { $holder->setTotalCorrectSubquestionsPercents((double) $result["total_correct_subquestions_percents"]); } return $holder; }
/** * @param $result * @return IHolder */ public function populate($result) { $holder = new \App\Holder\Results\Respondent\Category(); if (isset($result["category_id_category"])) { $holder->setCategory(Service::populateEntity($result, \App\Model\Category::getClassName(), "category")); } if (isset($result["entitycategory_id_entity_category"])) { $holder->setEntitycategory(Service::populateEntity($result, EntityCategory::getClassName(), "entitycategory")); } return $holder; }
/** * @param $result * @return \App\Holder\Page */ public function populate($result) { $holder = new \App\Holder\Page(); if (isset($result["page_id_page"])) { $holder->setPage(Service::populateEntity($result, \App\Model\Page::getClassName(), "page")); } if (isset($result["website_id_website"])) { $holder->setWebsite(Service::populateEntity($result, Website::getClassName(), "website")); } if (isset($result["wireframe_id_wireframe"])) { $holder->setCurrentWireframe(Service::populateEntity($result, Wireframe::getClassName(), "wireframe")); } return $holder; }
/** * @param $result * @return \App\Holder\Subquestion */ public function populate($result) { $holder = new \App\Holder\Subquestion(); if (isset($result["wireframe_id_wireframe"])) { $holder->setWireframe(Service::populateEntity($result, Wireframe::getClassName(), "wireframe")); } if (isset($result["subquestion_id_subquestion"])) { $holder->setSubquestion(Service::populateEntity($result, \App\Model\Subquestion::getClassName(), "subquestion")); } if (isset($result["question_id_question"])) { $holder->setQuestion(Service::populateEntity($result, Question::getClassName(), "question")); } if (isset($result["page_id_page"])) { $holder->setPage(Service::populateEntity($result, Page::getClassName(), "page")); } if (isset($result["website_id_website"])) { $holder->setWebsite(Service::populateEntity($result, Website::getClassName(), "website")); } return $holder; }
/** * @param $result * @return IHolder */ public function populate($result) { $holder = new \App\Holder\Highscore(); if (isset($result["respondent_id_respondent"])) { $holder->setRespondent(Service::populateEntity($result, \App\Model\Respondent::getClassName(), "respondent")); } if (isset($result["date"])) { $holder->setDate(new DateTime($result["date"])); } if (isset($result["count_questions"])) { $holder->setTotalQuestions((int) $result["count_questions"]); } if (isset($result["count_correct"])) { $holder->setTotalCorrect((int) $result["count_correct"]); } if (isset($result["score"])) { $holder->setScore((double) $result["score"]); } return $holder; }
/** * @param $result * @return IHolder */ public function populate($result) { $holder = new \App\Holder\Results\Base\Question(); if (isset($result["question_id_question"])) { $holder->setQuestion(Service::populateEntity($result, \App\Model\Question::getClassName(), "question")); } if (isset($result["subquestion_id_subquestion"])) { $holder->setSubquestion(Service::populateEntity($result, \App\Model\Subquestion::getClassName(), "subquestion")); } if (isset($result["page_id_page"])) { $holder->setPage(Service::populateEntity($result, \App\Model\Page::getClassName(), "page")); } if (isset($result["website_id_website"])) { $holder->setWebsite(Service::populateEntity($result, \App\Model\Website::getClassName(), "website")); } if (isset($result["respondent_id_respondent"])) { $holder->setRespondent(Service::populateEntity($result, \App\Model\Respondent::getClassName(), "respondent")); } if (isset($result["respondentwebsite_id_respondent_website"])) { $holder->setRespondentWebsite(Service::populateEntity($result, \App\Model\RespondentWebsite::getClassName(), "respondentwebsite")); } return $holder; }