1 | <?php |
||
8 | final class Entity implements Serializable |
||
9 | { |
||
10 | /** |
||
11 | * @var EntityId |
||
12 | */ |
||
13 | private $entityId; |
||
14 | |||
15 | /** |
||
16 | * @var EntityType |
||
17 | */ |
||
18 | private $entityType; |
||
19 | |||
20 | /** |
||
21 | * @param array $descriptor array('entity-id', 'sp or idp') |
||
22 | * @return Entity |
||
23 | */ |
||
24 | public static function fromDescriptor(array $descriptor) |
||
42 | |||
43 | public function __construct(EntityId $entityId, EntityType $entityType) |
||
48 | |||
49 | /** |
||
50 | * @param EntityId $entityId |
||
51 | * @return bool |
||
52 | */ |
||
53 | public function hasEntityId(EntityId $entityId) |
||
57 | |||
58 | /** |
||
59 | * @return bool |
||
60 | */ |
||
61 | public function isServiceProvider() |
||
65 | |||
66 | /** |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function isIdentityProvider() |
||
73 | |||
74 | /** |
||
75 | * @return EntityId |
||
76 | */ |
||
77 | public function getEntityId() |
||
81 | |||
82 | /** |
||
83 | * @return EntityType |
||
84 | */ |
||
85 | public function getEntityType() |
||
89 | |||
90 | /** |
||
91 | * @param Entity $other |
||
92 | * @return bool |
||
93 | */ |
||
94 | public function equals(Entity $other) |
||
98 | |||
99 | public static function deserialize($data) |
||
106 | |||
107 | public function serialize() |
||
114 | |||
115 | public function __toString() |
||
119 | } |
||
120 |