19 private $_servicesConfig;
29 foreach ($servicesConfig as $serviceName => $serviceInfo) {
30 if (!is_string($serviceName) || empty($serviceName)) {
31 throw new \InvalidArgumentException(
'Name for a currency import service has to be specified.');
33 if (empty($serviceInfo[
'class'])) {
34 throw new \InvalidArgumentException(
'Class for a currency import service has to be specified.');
36 if (empty($serviceInfo[
'label'])) {
37 throw new \InvalidArgumentException(
'Label for a currency import service has to be specified.');
40 $this->_servicesConfig = $servicesConfig;
50 return array_keys($this->_servicesConfig);
61 if (isset($this->_servicesConfig[$serviceName][
'class'])) {
62 return $this->_servicesConfig[$serviceName][
'class'];
75 if (isset($this->_servicesConfig[$serviceName][
'label'])) {
76 return __($this->_servicesConfig[$serviceName][
'label']);
__construct(array $servicesConfig)
getServiceLabel($serviceName)
getServiceClass($serviceName)