LogEntry.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?php
  2. /**
  3. * Contains a class for dealing with individual log entries
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program; if not, write to the Free Software Foundation, Inc.,
  17. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. * http://www.gnu.org/copyleft/gpl.html
  19. *
  20. * @file
  21. * @author Niklas Laxström
  22. * @license GPL-2.0-or-later
  23. * @since 1.19
  24. */
  25. /**
  26. * Interface for log entries. Every log entry has these methods.
  27. *
  28. * @since 1.19
  29. */
  30. interface LogEntry {
  31. /**
  32. * The main log type.
  33. *
  34. * @return string
  35. */
  36. public function getType();
  37. /**
  38. * The log subtype.
  39. *
  40. * @return string
  41. */
  42. public function getSubtype();
  43. /**
  44. * The full logtype in format maintype/subtype.
  45. *
  46. * @return string
  47. */
  48. public function getFullType();
  49. /**
  50. * Get the extra parameters stored for this message.
  51. *
  52. * @return array
  53. */
  54. public function getParameters();
  55. /**
  56. * Get the user who performed this action.
  57. *
  58. * @return User
  59. */
  60. public function getPerformer();
  61. /**
  62. * Get the target page of this action.
  63. *
  64. * @return Title
  65. */
  66. public function getTarget();
  67. /**
  68. * Get the timestamp when the action was executed.
  69. *
  70. * @return string
  71. */
  72. public function getTimestamp();
  73. /**
  74. * Get the user provided comment.
  75. *
  76. * @return string
  77. */
  78. public function getComment();
  79. /**
  80. * Get the access restriction.
  81. *
  82. * @return int
  83. */
  84. public function getDeleted();
  85. /**
  86. * @param int $field One of LogPage::DELETED_* bitfield constants
  87. * @return bool
  88. */
  89. public function isDeleted( $field );
  90. }