1 | <?php |
||
19 | abstract class Actor |
||
20 | { |
||
21 | /** |
||
22 | * Name of the {@link Agent} or {@link Group} |
||
23 | * @var string |
||
24 | */ |
||
25 | private $name; |
||
26 | |||
27 | /** |
||
28 | * A mailto IRI |
||
29 | * @var string |
||
30 | */ |
||
31 | private $mbox; |
||
32 | |||
33 | /** |
||
34 | * The SHA1 hash of a mailto IRI |
||
35 | * @var string |
||
36 | */ |
||
37 | private $mboxSha1Sum; |
||
38 | |||
39 | /** |
||
40 | * An openID uniquely identifying an Agent |
||
41 | * @var string |
||
42 | */ |
||
43 | private $openId; |
||
44 | |||
45 | /** |
||
46 | * A user account on an existing system |
||
47 | * @var Account |
||
48 | */ |
||
49 | private $account; |
||
50 | |||
51 | /** |
||
52 | * @param string $mbox |
||
53 | * @param string $mboxSha1Sum |
||
54 | * @param string $openId |
||
55 | * @param Account $account |
||
56 | * @param string $name |
||
57 | */ |
||
58 | public function __construct($mbox = null, $mboxSha1Sum = null, $openId = null, Account $account = null, $name = null) |
||
66 | |||
67 | /** |
||
68 | * Returns the Actor's inverse functional identifier. |
||
69 | * |
||
70 | * @return string The inverse functional identifier |
||
71 | */ |
||
72 | public function getInverseFunctionalIdentifier() |
||
92 | |||
93 | /** |
||
94 | * Returns the name of the {@link Agent} or {@link Group}. |
||
95 | * |
||
96 | * @return string The name |
||
97 | */ |
||
98 | public function getName() |
||
102 | |||
103 | /** |
||
104 | * Returns the mailto IRI. |
||
105 | * |
||
106 | * @return string The mailto IRI |
||
107 | */ |
||
108 | public function getMbox() |
||
112 | |||
113 | /** |
||
114 | * Returns the SHA1 hash of a mailto IRI. |
||
115 | * |
||
116 | * @return string The SHA1 hash of a mailto IRI |
||
117 | */ |
||
118 | public function getMboxSha1Sum() |
||
122 | |||
123 | /** |
||
124 | * Returns the openID. |
||
125 | * |
||
126 | * @return string The openID |
||
127 | */ |
||
128 | public function getOpenId() |
||
132 | |||
133 | /** |
||
134 | * Returns the user account of an existing system. |
||
135 | * |
||
136 | * @return Account The user account of an existing system |
||
137 | */ |
||
138 | public function getAccount() |
||
142 | |||
143 | /** |
||
144 | * Checks if another actor is equal. |
||
145 | * |
||
146 | * Two actors are equal if and only if all of their properties are equal. |
||
147 | * |
||
148 | * @param Actor $actor The actor to compare with |
||
149 | * |
||
150 | * @return bool True if the actors are equal, false otherwise |
||
151 | */ |
||
152 | public function equals(Actor $actor) |
||
184 | } |
||
185 |