|
0
|
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 |
/** |
|
|
15 |
* AclCache Interface |
|
|
16 |
* |
|
|
17 |
* @author Johannes M. Schmitt <schmittjoh@gmail.com> |
|
|
18 |
*/ |
|
|
19 |
interface AclCacheInterface |
|
|
20 |
{ |
|
|
21 |
/** |
|
|
22 |
* Removes an ACL from the cache |
|
|
23 |
* |
|
|
24 |
* @param string $primaryKey a serialized primary key |
|
|
25 |
* @return void |
|
|
26 |
*/ |
|
|
27 |
function evictFromCacheById($primaryKey); |
|
|
28 |
|
|
|
29 |
/** |
|
|
30 |
* Removes an ACL from the cache |
|
|
31 |
* |
|
|
32 |
* The ACL which is returned, must reference the passed object identity. |
|
|
33 |
* |
|
|
34 |
* @param ObjectIdentityInterface $oid |
|
|
35 |
* @return void |
|
|
36 |
*/ |
|
|
37 |
function evictFromCacheByIdentity(ObjectIdentityInterface $oid); |
|
|
38 |
|
|
|
39 |
/** |
|
|
40 |
* Retrieves an ACL for the given object identity primary key from the cache |
|
|
41 |
* |
|
|
42 |
* @param integer $primaryKey |
|
|
43 |
* @return AclInterface |
|
|
44 |
*/ |
|
|
45 |
function getFromCacheById($primaryKey); |
|
|
46 |
|
|
|
47 |
/** |
|
|
48 |
* Retrieves an ACL for the given object identity from the cache |
|
|
49 |
* |
|
|
50 |
* @param ObjectIdentityInterface $oid |
|
|
51 |
* @return AclInterface |
|
|
52 |
*/ |
|
|
53 |
function getFromCacheByIdentity(ObjectIdentityInterface $oid); |
|
|
54 |
|
|
|
55 |
/** |
|
|
56 |
* Stores a new ACL in the cache |
|
|
57 |
* |
|
|
58 |
* @param AclInterface $acl |
|
|
59 |
* @return void |
|
|
60 |
*/ |
|
|
61 |
function putInCache(AclInterface $acl); |
|
|
62 |
|
|
|
63 |
/** |
|
|
64 |
* Removes all ACLs from the cache |
|
|
65 |
* |
|
|
66 |
* @return void |
|
|
67 |
*/ |
|
|
68 |
function clearCache(); |
|
|
69 |
} |