File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,6 +38,13 @@ public function getByEntityId(string $entityId): ?TrustAnchorConfig
3838 }
3939
4040
41+ public function getByEntityIdOrFail (string $ entityId ): TrustAnchorConfig
42+ {
43+ return $ this ->trustAnchorConfigs [$ entityId ] ??
44+ throw new \InvalidArgumentException (sprintf ("No trust anchor config found for entity ID '%s'. " , $ entityId ));
45+ }
46+
47+
4148 /**
4249 * @return array<non-empty-string,\SimpleSAML\OpenID\ValueAbstracts\TrustAnchorConfig>
4350 */
@@ -47,6 +54,30 @@ public function getAll(): array
4754 }
4855
4956
57+ /**
58+ * @return array<non-empty-string>
59+ */
60+ public function getAllEntityIds (): array
61+ {
62+ return array_keys ($ this ->trustAnchorConfigs );
63+ }
64+
65+
66+ public function has (string $ entityId ): bool
67+ {
68+ return isset ($ this ->trustAnchorConfigs [$ entityId ]);
69+ }
70+
71+
72+ /**
73+ * @return array<non-empty-string,\SimpleSAML\OpenID\ValueAbstracts\TrustAnchorConfig>
74+ */
75+ public function getInCommonWith (TrustAnchorConfigBag $ otherBag ): array
76+ {
77+ return array_intersect_key ($ this ->getAll (), $ otherBag ->getAll ());
78+ }
79+
80+
5081 /**
5182 * @return \ArrayIterator<string,\SimpleSAML\OpenID\ValueAbstracts\TrustAnchorConfig>
5283 */
You can’t perform that action at this time.
0 commit comments