Project_Tag.php 1.1 KB

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