Entity.php 723 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Base entity file.
  4. *
  5. * Creates the entity and makes it available.
  6. *
  7. * @category Entity
  8. */
  9. /**
  10. * Entity superclass.
  11. *
  12. * Every other entity must inherit from this one. It represents a database
  13. * entity.
  14. *
  15. * @abstract
  16. * @category Entity
  17. */
  18. abstract class Entity{
  19. /**
  20. * @var resource Database connection.
  21. */
  22. public $db;
  23. /**
  24. * Constructor.
  25. *
  26. * Sets the database conection and the language.
  27. *
  28. * @param resource $db Connection to the database.
  29. */
  30. public function __construct($db){
  31. $this->db = $db;
  32. }
  33. }
  34. ?>