AclProviderInterface.php 1.7 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. /**
  12. * Provides a common interface for retrieving ACLs.
  13. *
  14. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  15. */
  16. interface AclProviderInterface
  17. {
  18. /**
  19. * Retrieves all child object identities from the database
  20. *
  21. * @param ObjectIdentityInterface $parentOid
  22. * @param Boolean $directChildrenOnly
  23. *
  24. * @return array returns an array of child 'ObjectIdentity's
  25. */
  26. public function findChildren(ObjectIdentityInterface $parentOid, $directChildrenOnly = false);
  27. /**
  28. * Returns the ACL that belongs to the given object identity
  29. *
  30. * @param ObjectIdentityInterface $oid
  31. * @param SecurityIdentityInterface[] $sids
  32. *
  33. * @return AclInterface
  34. *
  35. * @throws AclNotFoundException when there is no ACL
  36. */
  37. public function findAcl(ObjectIdentityInterface $oid, array $sids = array());
  38. /**
  39. * Returns the ACLs that belong to the given object identities
  40. *
  41. * @param ObjectIdentityInterface[] $oids an array of ObjectIdentityInterface implementations
  42. * @param SecurityIdentityInterface[] $sids an array of SecurityIdentityInterface implementations
  43. *
  44. * @return \SplObjectStorage mapping the passed object identities to ACLs
  45. *
  46. * @throws AclNotFoundException when we cannot find an ACL for all identities
  47. */
  48. public function findAcls(array $oids, array $sids = array());
  49. }