1 | <?php |
||
19 | final class InverseFunctionalIdentifier |
||
20 | { |
||
21 | /** |
||
22 | * @var string A mailto IRI |
||
23 | */ |
||
24 | private $mbox; |
||
25 | |||
26 | /** |
||
27 | * @var string The SHA1 hash of a mailto IRI |
||
28 | */ |
||
29 | private $mboxSha1Sum; |
||
30 | |||
31 | /** |
||
32 | * @var string An openID uniquely identifying an Agent |
||
33 | */ |
||
34 | private $openId; |
||
35 | |||
36 | /** |
||
37 | * @var Account A user account on an existing system |
||
38 | */ |
||
39 | private $account; |
||
40 | |||
41 | /** |
||
42 | * Use on of the with*() factory methods to obtain an InverseFunctionalIdentifier |
||
43 | * instance. |
||
44 | */ |
||
45 | private function __construct() |
||
48 | |||
49 | public static function withMbox($mbox) |
||
56 | |||
57 | public static function withMboxSha1Sum($mboxSha1Sum) |
||
64 | |||
65 | public static function withOpenId($openId) |
||
72 | |||
73 | public static function withAccount($account) |
||
80 | |||
81 | /** |
||
82 | * Checks if another IRI is equal. |
||
83 | * |
||
84 | * Two inverse functional identifiers are equal if and only if all of their |
||
85 | * properties are equal. |
||
86 | * |
||
87 | * @param InverseFunctionalIdentifier $iri The iri to compare with |
||
88 | * |
||
89 | * @return bool True if the IRIs are equal, false otherwise |
||
90 | */ |
||
91 | public function equals(InverseFunctionalIdentifier $iri) |
||
119 | |||
120 | public function __toString() |
||
136 | } |
||
137 |