ForumPost.class.php 628 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once 'Resource.class.php';
  4. /**
  5. * A forum-post
  6. * @author Bart Mollet <bart.mollet@hogent.be>
  7. * @package chamilo.backup
  8. */
  9. class ForumPost extends Coursecopy\Resource
  10. {
  11. /**
  12. * Create a new ForumPost
  13. */
  14. public function __construct($obj)
  15. {
  16. parent::__construct($obj->post_id, RESOURCE_FORUMPOST);
  17. $this->obj = $obj;
  18. }
  19. /**
  20. * Show this resource
  21. */
  22. public function show()
  23. {
  24. parent::show();
  25. echo $this->obj->title . ' (' . $this->obj->poster_name . ', ' . $this->obj->post_date . ')';
  26. }
  27. }