1 | <?php |
||
19 | class ServiceCredentialsFactory |
||
20 | { |
||
21 | /** |
||
22 | * @var CredentialsMapper |
||
23 | */ |
||
24 | protected $credentialsMapper; |
||
25 | |||
26 | /** |
||
27 | * @var CredentialsInterface[] |
||
28 | */ |
||
29 | protected $serviceCredentials; |
||
30 | |||
31 | /** |
||
32 | * @param CredentialsMapper $credentialsMapper |
||
33 | */ |
||
34 | public function __construct(CredentialsMapper $credentialsMapper) |
||
38 | |||
39 | /** |
||
40 | * @param string $serviceName |
||
41 | * @param array $credentials |
||
42 | * @return $this |
||
43 | */ |
||
44 | public function addCredentialsForService($serviceName, $credentials) |
||
58 | |||
59 | /** |
||
60 | * Returns the list of names of notification services |
||
61 | * |
||
62 | * @return array |
||
63 | */ |
||
64 | public function getInitializedServices() |
||
68 | |||
69 | /** |
||
70 | * Returns credentials for notification service |
||
71 | * |
||
72 | * @param string $serviceName |
||
73 | * @throws DomainException |
||
74 | * @return CredentialsInterface |
||
75 | */ |
||
76 | public function getCredentialsByService($serviceName) |
||
86 | |||
87 | /** |
||
88 | * @param string $serviceName |
||
89 | * @return CredentialsInterface |
||
90 | */ |
||
91 | private function getCredentialsDTOByServiceName($serviceName) |
||
109 | } |
||
110 |