1 | <?php |
||
19 | final class Account |
||
20 | { |
||
21 | /** |
||
22 | * The unique id or name used to log in to this account |
||
23 | * @var string |
||
24 | */ |
||
25 | private $name; |
||
26 | |||
27 | /** |
||
28 | * Canonical home page for the system the account is on |
||
29 | * @var string |
||
30 | */ |
||
31 | private $homePage; |
||
32 | |||
33 | /** |
||
34 | * @param string $name |
||
35 | * @param string $homePage |
||
36 | */ |
||
37 | public function __construct($name = '', $homePage = '') |
||
42 | |||
43 | /** |
||
44 | * Returns the unique id or name used to log in to this account. |
||
45 | * |
||
46 | * @return string The user name |
||
47 | */ |
||
48 | public function getName() |
||
52 | |||
53 | /** |
||
54 | * Returns the home page for the system the account is on. |
||
55 | * |
||
56 | * @return string The home page |
||
57 | */ |
||
58 | public function getHomePage() |
||
62 | |||
63 | /** |
||
64 | * Checks if another account is equal. |
||
65 | * |
||
66 | * Two accounts are equal if and only if all of their properties are equal. |
||
67 | * |
||
68 | * @param Account $account The account to compare with |
||
69 | * |
||
70 | * @return bool True if the accounts are equal, false otherwise |
||
71 | */ |
||
72 | public function equals(Account $account) |
||
84 | } |
||
85 |