1 | <?php |
||
19 | class AccountManager implements AccountManagerInterface |
||
20 | { |
||
21 | /** |
||
22 | * The default account's configuration key |
||
23 | * @var string |
||
24 | */ |
||
25 | private $defaultAccountKey; |
||
26 | |||
27 | /** |
||
28 | * The accounts being managed |
||
29 | * @var Account[] |
||
30 | */ |
||
31 | private $accounts = array(); |
||
32 | |||
33 | /** |
||
34 | * {@inheritDoc} |
||
35 | */ |
||
36 | 10 | public function registerAccount($key, Account $account) |
|
40 | |||
41 | /** |
||
42 | * {@inheritDoc} |
||
43 | */ |
||
44 | 9 | public function hasAccount($key) |
|
48 | |||
49 | /** |
||
50 | * {@inheritDoc} |
||
51 | */ |
||
52 | 9 | public function getAccount($key = null) |
|
64 | |||
65 | /** |
||
66 | * {@inheritDoc} |
||
67 | */ |
||
68 | 9 | public function setDefaultAccount($key) |
|
72 | |||
73 | /** |
||
74 | * {@inheritDoc} |
||
75 | */ |
||
76 | 4 | public function getDefaultAccount() |
|
80 | } |
||
81 |