vendor/symfony/src/Symfony/Component/Security/Acl/Model/ObjectIdentityInterface.php
equal
deleted
inserted
replaced
|
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 * Represents the identity of an individual domain object instance. |
|
16 * |
|
17 * @author Johannes M. Schmitt <schmittjoh@gmail.com> |
|
18 */ |
|
19 interface ObjectIdentityInterface |
|
20 { |
|
21 /** |
|
22 * We specifically require this method so we can check for object equality |
|
23 * explicitly, and do not have to rely on referencial equality instead. |
|
24 * |
|
25 * Though in most cases, both checks should result in the same outcome. |
|
26 * |
|
27 * Referential Equality: $object1 === $object2 |
|
28 * Example for Object Equality: $object1->getId() === $object2->getId() |
|
29 * |
|
30 * @param ObjectIdentityInterface $identity |
|
31 * @return Boolean |
|
32 */ |
|
33 function equals(ObjectIdentityInterface $identity); |
|
34 |
|
35 /** |
|
36 * Obtains a unique identifier for this object. The identifier must not be |
|
37 * re-used for other objects with the same type. |
|
38 * |
|
39 * @return string cannot return null |
|
40 */ |
|
41 function getIdentifier(); |
|
42 |
|
43 /** |
|
44 * Returns a type for the domain object. Typically, this is the PHP class name. |
|
45 * |
|
46 * @return string cannot return null |
|
47 */ |
|
48 function getType(); |
|
49 } |