Project_Tag.php 780 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. require_once(PATH::ENTITY . "Entity.php");
  3. /**
  4. * Tag of a project.
  5. *
  6. * Represents an object from the table 'project_tag'.
  7. */
  8. class Project_Tag extends Entity{
  9. /**
  10. * Identifier of the project the tag belongs to.
  11. */
  12. public $project;
  13. /**
  14. * Tag text.
  15. */
  16. public $tag;
  17. /**
  18. * Constructor.
  19. *
  20. * Searches the database and retrieves the information about the
  21. * tag, populating it.
  22. *
  23. * @param int $project Identifier of the project the tag belongs to.
  24. * @param string $tag Tag identifier. Same as it's text.
  25. */
  26. public function __construct($db, $lang, $project, $tag){
  27. parent::__construct($db, $lang);
  28. $this->project = $project;
  29. $this->tag = text($this, $tag);
  30. }
  31. }