| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <?php
- /**
- * Page superclass file.
- *
- * Provides a class with all the properties and methods to display the page.
- *
- * @author Iñigo Valentin <i@inigovalentin.com>
- * @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License V3
- * @package SWDB
- */
- /**
- * Page superclass.
- *
- * Every visitable page type must inherit from this one.
- *
- * @category Page
- */
- abstract class Page{
- /**
- * @var string Path to the view associated with the page.
- */
- protected $view;
- /**
- * @var string Title of the page, in the defined language.
- */
- protected $title;
- /**
- * @var string Site name.
- */
- protected $name;
- /**
- * @var string Page description, in the defined language.
- */
- protected $description;
- /**
- * @var string URL to the site favicon.
- */
- protected $favicon;
- /**
- * @var string URL to the page icon or main image.
- */
- protected $icon;
- /**
- * @var string Canonical URL.
- */
- protected $canonical;
- /**
- * @var string Autjhor URL.
- */
- protected $author;
- /**
- * Constructor.
- */
- public function __construct(){
- $this->favicon = URL::IMG["LOGO"] . "sw.png";
- $this->icon = URL::IMG["LOGO"] . "sw.png";
- $this->name = "SWDB";
- $this->author = URL::BASE;
- }
- /**
- * Retrieves the page view file.
- *
- * @return string Path to the view file.
- */
- public function get_view(){
- return $this->view;
- }
- /**
- * Retrieves the page title.
- *
- * @return string Page title.
- */
- public function get_title(){
- return $this->title;
- }
- /**
- * Retrieves the site name.
- *
- * @return string Site name.
- */
- public function get_name(){
- return $this->name;
- }
- /**
- * Retrieves the page description
- *
- * @return string Page description.
- */
- public function get_description(){
- return $this->description;
- }
- /**
- * Retrieves the URL to the favicon.
- *
- * @return string Favicon URL.
- */
- public function get_favicon(){
- return $this->favicon;
- }
- /**
- * Retrieves the URL to the thumbnail image.
- *
- * @return string Thmbnail icon URL.
- */
- public function get_icon(){
- return $this->icon;
- }
- /**
- * Retrieves the canonical URL to the page.
- *
- * @return string Canonical URL.
- */
- public function get_canonical(){
- return $this->canonical;
- }
- /**
- * Retrieves the author URL (site main URL).
- *
- * @return string AUthor URL.
- */
- public function get_author(){
- return $this->author;
- }
- }
- ?>
|