1 | <?php |
||
17 | class ServiceCredentialsFactory |
||
18 | { |
||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $credentialsPath; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $config; |
||
28 | |||
29 | /** |
||
30 | * @param CredentialsMapper $credentialsMapper |
||
31 | */ |
||
32 | public function __construct(CredentialsMapper $credentialsMapper) |
||
36 | |||
37 | /** |
||
38 | * @param string $credentialsPath |
||
39 | * @return $this |
||
40 | */ |
||
41 | public function setCredentialsPath($credentialsPath) |
||
46 | |||
47 | /** |
||
48 | * Load sender`s notification services credentials |
||
49 | * |
||
50 | * @return $this |
||
51 | * @throws DomainException |
||
52 | */ |
||
53 | public function loadServiceCredentialsConfig() |
||
76 | |||
77 | /** |
||
78 | * Returns the list of names of notification services |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | public function getInitializedServices() |
||
86 | |||
87 | /** |
||
88 | * Returns credentials for notification service |
||
89 | * |
||
90 | * @param string $serviceName |
||
91 | * @throws DomainException |
||
92 | * @return array |
||
93 | */ |
||
94 | public function getCredentialsByService($serviceName) |
||
115 | } |
||
116 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: