Page.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. require_once($path["model"] . "Footer.php");
  3. /**
  4. * Page superclass.
  5. *
  6. * Every visitable page type must inherit from this one.
  7. */
  8. abstract class Page{
  9. /**
  10. * Database connection.
  11. */
  12. public $db;
  13. /**
  14. * View associated with the page.
  15. */
  16. public $view;
  17. /**
  18. * Language the page will be served on (lowercase, two-letter
  19. * language code).
  20. */
  21. public $lang;
  22. /**
  23. * Footer.
  24. * @see Footer_Page
  25. */
  26. public $footer;
  27. /**
  28. * Title of the page, in the defined language.
  29. */
  30. public $title;
  31. /**
  32. * Site name.
  33. */
  34. public $name;
  35. /**
  36. * Page description, in the defined language.
  37. */
  38. public $description;
  39. /**
  40. * Path to the site favicon.
  41. */
  42. public $favicon;
  43. /**
  44. * Path to the page icon or main image.
  45. */
  46. public $icon;
  47. /**
  48. * Canonical URL.
  49. */
  50. public $canonical;
  51. /**
  52. * Autjhor URL.
  53. */
  54. public $author;
  55. /**
  56. * Constructor.
  57. *
  58. * @param MySQL_connection $db Connection to the database.
  59. * @param string $lang Lowercase, two-letter language code.
  60. */
  61. public function __construct($db, $lang){
  62. $this->db = $db;
  63. $this->lang = $lang;
  64. $this->footer = new Footer($db, $lang);
  65. }
  66. }
  67. ?>