AuditManagerInterface.php 1.1 KB

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