Page.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * Page superclass.
  4. *
  5. * Every visitable page type must inherit from this one.
  6. */
  7. abstract class Page{
  8. /**
  9. * Database connection.
  10. */
  11. public $db;
  12. /**
  13. * View associated with the page.
  14. */
  15. public $view;
  16. /**
  17. * Title of the page, in the defined language.
  18. */
  19. public $title;
  20. /**
  21. * Site name.
  22. */
  23. public $name;
  24. /**
  25. * Page description, in the defined language.
  26. */
  27. public $description;
  28. /**
  29. * Path to the site favicon.
  30. */
  31. public $favicon;
  32. /**
  33. * Path to the page icon or main image.
  34. */
  35. public $icon;
  36. /**
  37. * Canonical URL.
  38. */
  39. public $canonical;
  40. /**
  41. * Autjhor URL.
  42. */
  43. public $author;
  44. /**
  45. * Constructor.
  46. *
  47. * @param SQLite3 $db Connection to the database.
  48. */
  49. public function __construct($db){
  50. global $path;
  51. global $root;
  52. $this->db = $db;
  53. $this->favicon = $path["img"]["layout"] . "logo/sw.png";
  54. $this->icon = $path["img"]["layout"] . "logo/sw.png";
  55. $this->name = "SWDB";
  56. $this->author = $root;
  57. }
  58. }
  59. ?>