AuditManagerInterface.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 AuditManagerInterface.
  13. *
  14. * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
  15. */
  16. interface AuditManagerInterface
  17. {
  18. /**
  19. * Set AuditReaderInterface service id for array of $classes.
  20. *
  21. * @param string $serviceId
  22. * @param array $classes
  23. */
  24. public function setReader($serviceId, array $classes);
  25. /**
  26. * Returns true if $class has AuditReaderInterface.
  27. *
  28. * @param string $class
  29. *
  30. * @return bool
  31. */
  32. public function hasReader($class);
  33. /**
  34. * Get AuditReaderInterface service for $class.
  35. *
  36. * @param string $class
  37. *
  38. * @return \Sonata\AdminBundle\Model\AuditReaderInterface
  39. *
  40. * @throws \RuntimeException
  41. */
  42. public function getReader($class);
  43. }