MutableAclProviderInterface.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. use Symfony\Component\Security\Acl\Exception\AclAlreadyExistsException;
  12. /**
  13. * Provides support for creating and storing ACL instances.
  14. *
  15. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  16. */
  17. interface MutableAclProviderInterface extends AclProviderInterface
  18. {
  19. /**
  20. * Creates a new ACL for the given object identity.
  21. *
  22. * @param ObjectIdentityInterface $oid
  23. *
  24. * @throws AclAlreadyExistsException when there already is an ACL for the given
  25. * object identity
  26. *
  27. * @return MutableAclInterface
  28. */
  29. public function createAcl(ObjectIdentityInterface $oid);
  30. /**
  31. * Deletes the ACL for a given object identity.
  32. *
  33. * This will automatically trigger a delete for any child ACLs. If you don't
  34. * want child ACLs to be deleted, you will have to set their parent ACL to null.
  35. *
  36. * @param ObjectIdentityInterface $oid
  37. */
  38. public function deleteAcl(ObjectIdentityInterface $oid);
  39. /**
  40. * Persists any changes which were made to the ACL, or any associated
  41. * access control entries.
  42. *
  43. * Changes to parent ACLs are not persisted.
  44. *
  45. * @param MutableAclInterface $acl
  46. */
  47. public function updateAcl(MutableAclInterface $acl);
  48. }