Monster_Page.php 969 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. require_once($path["page"] . "Page.php");
  3. require_once($path["entity"] . "Monster.php");
  4. /**
  5. * Monster view page.
  6. */
  7. class Monster_Page extends Page{
  8. /**
  9. * Selected @{see Monster}.
  10. */
  11. public $monsters;
  12. /**
  13. * Constructor.
  14. *
  15. * Retrieves the data and initializes the variables.
  16. *
  17. * @param SQLite3 $db Connection to the database.
  18. * @param string $id Monster id
  19. */
  20. public function __construct($db, $id){
  21. global $path;
  22. global $root;
  23. parent::__construct($db);
  24. $this->view = $path["view"] . "monster.php";
  25. $this->monster = new Monster($db, $id);
  26. $this->title = $this->monster->monster->name ." - SWDB";
  27. $this->description = "Owned " . $this->monster->monster->name;
  28. $this->canonical = $root . "monster/" . $id;
  29. }
  30. }
  31. ?>