Home_Page.php 1023 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. public function __construct(){
  30. $this->player = get_context()->get_player();
  31. $this->view = PATH::VIEW . "home.php";
  32. $this->title = get_context()->get_player()->get_name() . " - SWDB";
  33. $this->description = get_context()->get_player()->get_name() . " - Summoners War DataBase";
  34. $this->canonical = URL::BASE;
  35. }
  36. }
  37. ?>