AuditReaderInterface.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
  13. */
  14. interface AuditReaderInterface
  15. {
  16. /**
  17. * @param string $className
  18. * @param string $id
  19. * @param string $revision
  20. */
  21. public function find($className, $id, $revision);
  22. /**
  23. * @param string $className
  24. * @param int $limit
  25. * @param int $offset
  26. */
  27. public function findRevisionHistory($className, $limit = 20, $offset = 0);
  28. /**
  29. * @param string $classname
  30. * @param string $revision
  31. */
  32. public function findRevision($classname, $revision);
  33. /**
  34. * @param string $className
  35. * @param string $id
  36. */
  37. public function findRevisions($className, $id);
  38. /**
  39. * @param string $className
  40. * @param int $id
  41. * @param int $oldRevision
  42. * @param int $newRevision
  43. */
  44. public function diff($className, $id, $oldRevision, $newRevision);
  45. }