AclProviderInterface.php 1.7 KB

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