1 | <?php |
||
17 | class ServiceCredentialsFactory |
||
18 | { |
||
19 | /** |
||
20 | * @var CredentialsMapper |
||
21 | */ |
||
22 | protected $credentialsMapper; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $credentialsPath; |
||
28 | |||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $config; |
||
33 | |||
34 | /** |
||
35 | * @param CredentialsMapper $credentialsMapper |
||
36 | */ |
||
37 | public function __construct(CredentialsMapper $credentialsMapper) |
||
41 | |||
42 | /** |
||
43 | * @param string $credentialsPath |
||
44 | * @return $this |
||
45 | */ |
||
46 | public function setCredentialsPath($credentialsPath) |
||
51 | |||
52 | /** |
||
53 | * @param array $config |
||
54 | * @return $this |
||
55 | */ |
||
56 | public function setConfig(array $config) |
||
61 | |||
62 | /** |
||
63 | * Load sender`s notification services credentials |
||
64 | * |
||
65 | * @return $this |
||
66 | * @throws DomainException |
||
67 | */ |
||
68 | public function loadServiceCredentialsConfig() |
||
91 | |||
92 | /** |
||
93 | * Returns the list of names of notification services |
||
94 | * |
||
95 | * @return array |
||
96 | */ |
||
97 | public function getInitializedServices() |
||
101 | |||
102 | /** |
||
103 | * Returns credentials for notification service |
||
104 | * |
||
105 | * @param string $serviceName |
||
106 | * @throws DomainException |
||
107 | * @return array |
||
108 | */ |
||
109 | public function getCredentialsByService($serviceName) |
||
130 | } |
||
131 |