<?php


    /**
     * Page superclass.
     *
     * Every visitable page type must inherit from this one.
     */
    abstract class Page{

        /**
         * Database connection.
         */
        public $db;

        /**
         * View associated with the page.
         */
        public $view;

        /**
         * Title of the page, in the defined language.
         */
        public $title;

        /**
         * Site name.
         */
        public $name;

        /**
         * Page description, in the defined language.
         */
        public $description;

        /**
         * Path to the site favicon.
         */
        public $favicon;

        /**
         * Path to the page icon or main image.
         */
        public $icon;

        /**
         * Canonical URL.
         */
        public $canonical;

        /**
         * Autjhor URL.
         */
        public $author;

        /**
         * Constructor.
         *
         * @param SQLite3 $db Connection to the database.
         */
        public function __construct($db){
            global $path;
            global $root;
            $this->db = $db;
            $this->favicon = $path["img"]["logo"] . "sw.png";
            $this->icon = $path["img"]["logo"] . "sw.png";
            $this->name = "SWDB";
            $this->author = $root;
        }
    }
?>
