OfferRetriever.class.php 486 B

1234567891011121314151617181920212223242526
  1. <?php
  2. class OfferRetriever
  3. {
  4. public static function getInstance()
  5. {
  6. return new OfferRetriever(Persistence::getInstance());
  7. }
  8. private $persistence;
  9. public function __construct(Persistence $persistence)
  10. {
  11. $this->persistence = $persistence;
  12. }
  13. public function getPageData($offerId, $page)
  14. {
  15. $result = $this->persistence->getOfferPathPage($offerId, $page);
  16. if($result == null)
  17. {
  18. $result = array("filename" => "templateDoesNotExist.html");
  19. }
  20. return $result;
  21. }
  22. }