/** * @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 \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; }