You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FakeManager.php 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php
  2. namespace Test\Comments;
  3. use OCP\Comments\IComment;
  4. use OCP\Comments\ICommentsManager;
  5. use OCP\IUser;
  6. /**
  7. * Class FakeManager
  8. */
  9. class FakeManager implements ICommentsManager {
  10. public function get($id) {
  11. }
  12. public function getTree($id, $limit = 0, $offset = 0) {
  13. }
  14. public function getForObject(
  15. $objectType,
  16. $objectId,
  17. $limit = 0,
  18. $offset = 0,
  19. \DateTime $notOlderThan = null
  20. ) {
  21. }
  22. public function getForObjectSince(
  23. string $objectType,
  24. string $objectId,
  25. int $lastKnownCommentId,
  26. string $sortDirection = 'asc',
  27. int $limit = 30,
  28. bool $includeLastKnown = false
  29. ): array {
  30. return [];
  31. }
  32. public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null, $verb = '') {
  33. }
  34. public function search(string $search, string $objectType, string $objectId, string $verb, int $offset, int $limit = 50): array {
  35. return [];
  36. }
  37. public function create($actorType, $actorId, $objectType, $objectId) {
  38. }
  39. public function delete($id) {
  40. }
  41. public function save(IComment $comment) {
  42. }
  43. public function deleteReferencesOfActor($actorType, $actorId) {
  44. }
  45. public function deleteCommentsAtObject($objectType, $objectId) {
  46. }
  47. public function setReadMark($objectType, $objectId, \DateTime $dateTime, IUser $user) {
  48. }
  49. public function getReadMark($objectType, $objectId, IUser $user) {
  50. }
  51. public function deleteReadMarksFromUser(IUser $user) {
  52. }
  53. public function deleteReadMarksOnObject($objectType, $objectId) {
  54. }
  55. public function registerEventHandler(\Closure $closure) {
  56. }
  57. public function registerDisplayNameResolver($type, \Closure $closure) {
  58. }
  59. public function resolveDisplayName($type, $id) {
  60. }
  61. public function getNumberOfUnreadCommentsForFolder($folderId, IUser $user) {
  62. }
  63. public function getNumberOfUnreadCommentsForObjects(string $objectType, array $objectIds, IUser $user, $verb = ''): array {
  64. return [];
  65. }
  66. public function getActorsInTree($id) {
  67. }
  68. public function load(): void {
  69. }
  70. public function searchForObjects(string $search, string $objectType, array $objectIds, string $verb, int $offset, int $limit = 50): array {
  71. return [];
  72. }
  73. public function getNumberOfCommentsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, string $verb = ''): int {
  74. return 0;
  75. }
  76. public function getNumberOfCommentsWithVerbsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, array $verbs): int {
  77. return 0;
  78. }
  79. public function getLastCommentBeforeDate(string $objectType, string $objectId, \DateTime $beforeDate, string $verb = ''): int {
  80. return 0;
  81. }
  82. public function getLastCommentDateByActor(string $objectType, string $objectId, string $verb, string $actorType, array $actors): array {
  83. return [];
  84. }
  85. }