LoadDefaultPageInformation.inc 522 B

12345678910111213141516171819202122232425
  1. <?php
  2. class LoadDefaultPageInformation implements IBusinessLogic
  3. {
  4. public static function getInstance()
  5. {
  6. return new LoadDefaultPageInformation(new Rest());
  7. }
  8. private $rest;
  9. private function __construct(Rest $rest)
  10. {
  11. $this->rest = $rest;
  12. }
  13. public function process()
  14. {
  15. $pageData = array();
  16. $id = $this->rest->getDefaulted('id', 1);
  17. $sql = sprintf("SELECT * FROM page_information where page_id = %s", $id);
  18. $pageData['load_page_sql'] = $sql;
  19. $pageData['title'] = "default";
  20. return $pageData;
  21. }
  22. }