AclCacheInterface.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  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 Symfony\Component\Security\Acl\Model;
  11. /**
  12. * AclCache Interface.
  13. *
  14. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  15. */
  16. interface AclCacheInterface
  17. {
  18. /**
  19. * Removes an ACL from the cache.
  20. *
  21. * @param string $primaryKey a serialized primary key
  22. */
  23. public function evictFromCacheById($primaryKey);
  24. /**
  25. * Removes an ACL from the cache.
  26. *
  27. * The ACL which is returned, must reference the passed object identity.
  28. *
  29. * @param ObjectIdentityInterface $oid
  30. */
  31. public function evictFromCacheByIdentity(ObjectIdentityInterface $oid);
  32. /**
  33. * Retrieves an ACL for the given object identity primary key from the cache.
  34. *
  35. * @param int $primaryKey
  36. *
  37. * @return AclInterface
  38. */
  39. public function getFromCacheById($primaryKey);
  40. /**
  41. * Retrieves an ACL for the given object identity from the cache.
  42. *
  43. * @param ObjectIdentityInterface $oid
  44. *
  45. * @return AclInterface
  46. */
  47. public function getFromCacheByIdentity(ObjectIdentityInterface $oid);
  48. /**
  49. * Stores a new ACL in the cache.
  50. *
  51. * @param AclInterface $acl
  52. */
  53. public function putInCache(AclInterface $acl);
  54. /**
  55. * Removes all ACLs from the cache.
  56. */
  57. public function clearCache();
  58. }