AuditReaderInterface.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /*
  3. * This file is part of the Sonata Project package.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Sonata\AdminBundle\Model;
  11. /**
  12. * Interface AuditReaderInterface.
  13. *
  14. * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
  15. */
  16. interface AuditReaderInterface
  17. {
  18. /**
  19. * @param string $className
  20. * @param string $id
  21. * @param string $revision
  22. */
  23. public function find($className, $id, $revision);
  24. /**
  25. * @param string $className
  26. * @param int $limit
  27. * @param int $offset
  28. */
  29. public function findRevisionHistory($className, $limit = 20, $offset = 0);
  30. /**
  31. * @param string $classname
  32. * @param string $revision
  33. */
  34. public function findRevision($classname, $revision);
  35. /**
  36. * @param string $className
  37. * @param string $id
  38. */
  39. public function findRevisions($className, $id);
  40. /**
  41. * @param string $className
  42. * @param int $id
  43. * @param int $oldRevision
  44. * @param int $newRevision
  45. */
  46. public function diff($className, $id, $oldRevision, $newRevision);
  47. }