Home_Page.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Home page file.
  4. *
  5. * Provides a class with all the properties and methods to display the page.
  6. *
  7. * @category Page
  8. */
  9. /**
  10. * Require dependent files if not present.
  11. */
  12. require_once(PATH::PAGE . "Page.php");
  13. require_once(PATH::ENTITY . "Player.php");
  14. /**
  15. * Home page model.
  16. *
  17. * @category Page
  18. */
  19. class Home_Page extends Page{
  20. /**
  21. * @var Player Player instance.
  22. */
  23. public $player;
  24. /**
  25. * Constructor.
  26. *
  27. * Retrieves the data and initializes the variables.
  28. *
  29. * @global int Player ID.
  30. */
  31. public function __construct(){
  32. global $UID;
  33. $this->view = PATH::VIEW . "home.php";
  34. $this->player = new Player($UID);
  35. $this->title = $this->player->name . " - SWDB";
  36. $this->description = $this->player->name . " - Summoners War DataBase";
  37. $this->canonical = URL::BASE;
  38. }
  39. }
  40. ?>