AuditReaderInterface.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /*
  3. * This file is part of the Sonata 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. * @package Sonata\AdminBundle\Model
  15. * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
  16. */
  17. interface AuditReaderInterface
  18. {
  19. /**
  20. * @param string $className
  21. * @param string $id
  22. * @param string $revision
  23. */
  24. public function find($className, $id, $revision);
  25. /**
  26. * @param string $className
  27. * @param int $limit
  28. * @param int $offset
  29. */
  30. public function findRevisionHistory($className, $limit = 20, $offset = 0);
  31. /**
  32. * @param string $classname
  33. * @param string $revision
  34. */
  35. public function findRevision($classname, $revision);
  36. /**
  37. * @param string $className
  38. * @param string $id
  39. */
  40. public function findRevisions($className, $id);
  41. /**
  42. * @param string $className
  43. * @param int $id
  44. * @param int $oldRevision
  45. * @param int $newRevision
  46. */
  47. public function diff($className, $id, $oldRevision, $newRevision);
  48. }