1: <?php
2:
3: /*
4: * This file is part of the Symfony package.
5: *
6: * (c) Fabien Potencier <fabien@symfony.com>
7: *
8: * For the full copyright and license information, please view the LICENSE
9: * file that was distributed with this source code.
10: */
11:
12: namespace Symfony\Component\Security\Acl\Model;
13:
14: use Symfony\Component\Security\Acl\Exception\AclNotFoundException;
15:
16: /**
17: * Provides a common interface for retrieving ACLs.
18: *
19: * @author Johannes M. Schmitt <schmittjoh@gmail.com>
20: */
21: interface AclProviderInterface
22: {
23: /**
24: * Retrieves all child object identities from the database
25: *
26: * @param ObjectIdentityInterface $parentOid
27: * @param bool $directChildrenOnly
28: *
29: * @return array returns an array of child 'ObjectIdentity's
30: */
31: public function findChildren(ObjectIdentityInterface $parentOid, $directChildrenOnly = false);
32:
33: /**
34: * Returns the ACL that belongs to the given object identity
35: *
36: * @param ObjectIdentityInterface $oid
37: * @param SecurityIdentityInterface[] $sids
38: *
39: * @return AclInterface
40: *
41: * @throws AclNotFoundException when there is no ACL
42: */
43: public function findAcl(ObjectIdentityInterface $oid, array $sids = array());
44:
45: /**
46: * Returns the ACLs that belong to the given object identities
47: *
48: * @param ObjectIdentityInterface[] $oids an array of ObjectIdentityInterface implementations
49: * @param SecurityIdentityInterface[] $sids an array of SecurityIdentityInterface implementations
50: *
51: * @return \SplObjectStorage mapping the passed object identities to ACLs
52: *
53: * @throws AclNotFoundException when we cannot find an ACL for all identities
54: */
55: public function findAcls(array $oids, array $sids = array());
56: }
57: