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