1 | <?php |
||
7 | final class Entity |
||
8 | { |
||
9 | /** |
||
10 | * @var EntityId |
||
11 | */ |
||
12 | private $entityId; |
||
13 | |||
14 | /** |
||
15 | * @var EntityType |
||
16 | */ |
||
17 | private $entityType; |
||
18 | |||
19 | /** |
||
20 | * @param array $descriptor array('entity-id', 'sp or idp') |
||
21 | * @return Entity |
||
22 | */ |
||
23 | public static function fromDescriptor(array $descriptor) |
||
41 | |||
42 | public function __construct(EntityId $entityId, EntityType $entityType) |
||
47 | |||
48 | /** |
||
49 | * @param EntityId $entityId |
||
50 | * @return bool |
||
51 | */ |
||
52 | public function hasEntityId(EntityId $entityId) |
||
56 | |||
57 | /** |
||
58 | * @return bool |
||
59 | */ |
||
60 | public function isServiceProvider() |
||
64 | |||
65 | /** |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function isIdentityProvider() |
||
72 | |||
73 | /** |
||
74 | * @return EntityId |
||
75 | */ |
||
76 | public function getEntityId() |
||
80 | |||
81 | /** |
||
82 | * @return EntityType |
||
83 | */ |
||
84 | public function getEntityType() |
||
88 | |||
89 | /** |
||
90 | * @param Entity $other |
||
91 | * @return bool |
||
92 | */ |
||
93 | public function equals(Entity $other) |
||
97 | |||
98 | public function __toString() |
||
102 | } |
||
103 |