Handler.php 823 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. require_once($path["handler"] . "Handler.php");
  3. require_once($path["entity"] . "Monster_Collection.php");
  4. /**
  5. * Handles the update of a monster in the collection.
  6. */
  7. class Handler{
  8. /**
  9. * {@see Entity} to be updated or created.
  10. */
  11. public $entity;
  12. /**
  13. * Database connection.
  14. */
  15. public $db;
  16. /**
  17. * HTTP status code after the operations.
  18. */
  19. public $response;
  20. /**
  21. * Constructor.
  22. *
  23. *
  24. * @param MySQL_connection $db Connection to the database.
  25. * @param Entity $entity Entity to be updated.
  26. */
  27. public function __construct($db, $entity){
  28. $this->db = $db;
  29. $this->entity = $entity;
  30. }
  31. }
  32. ?>