AclCacheInterface.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 integer $primaryKey
  36. * @return AclInterface
  37. */
  38. public function getFromCacheById($primaryKey);
  39. /**
  40. * Retrieves an ACL for the given object identity from the cache
  41. *
  42. * @param ObjectIdentityInterface $oid
  43. * @return AclInterface
  44. */
  45. public function getFromCacheByIdentity(ObjectIdentityInterface $oid);
  46. /**
  47. * Stores a new ACL in the cache
  48. *
  49. * @param AclInterface $acl
  50. */
  51. public function putInCache(AclInterface $acl);
  52. /**
  53. * Removes all ACLs from the cache
  54. */
  55. public function clearCache();
  56. }