|
@@ 305-312 (lines=8) @@
|
| 302 |
|
$service = $factory->buildService($serviceKey); |
| 303 |
|
|
| 304 |
|
// Add Protocol Service, if required, with custom or default config: |
| 305 |
|
if (method_exists($service, 'setServiceProtocol')) { |
| 306 |
|
$protocolConfig = $config->getValue($factoryKey . '/' . $serviceKey . '/protocol'); |
| 307 |
|
if ($protocolConfig == null) { |
| 308 |
|
$protocolConfig = $config->getValue($factoryKey . '/default/protocol'); |
| 309 |
|
} |
| 310 |
|
|
| 311 |
|
$serviceProtocol = $this->buildServiceProtocol($protocolConfig, $factoryKey); |
| 312 |
|
$service->setServiceProtocol($serviceProtocol); |
| 313 |
|
} |
| 314 |
|
|
| 315 |
|
if (method_exists($service, 'setValidator')) { |
|
@@ 315-324 (lines=10) @@
|
| 312 |
|
$service->setServiceProtocol($serviceProtocol); |
| 313 |
|
} |
| 314 |
|
|
| 315 |
|
if (method_exists($service, 'setValidator')) { |
| 316 |
|
$validatorConfig = $config->getValue($factoryKey . '/' . $serviceKey . '/validator'); |
| 317 |
|
if ($validatorConfig == null) { |
| 318 |
|
$validatorConfig = $config->getValue($factoryKey . '/default/validator'); |
| 319 |
|
} |
| 320 |
|
|
| 321 |
|
$validator = $this->buildServiceValidation($validatorConfig); |
| 322 |
|
if ($validator !== null) { |
| 323 |
|
$service->setValidator($validator); |
| 324 |
|
} |
| 325 |
|
} |
| 326 |
|
|
| 327 |
|
if (method_exists($service, 'setValidators')) { |
|
@@ 327-336 (lines=10) @@
|
| 324 |
|
} |
| 325 |
|
} |
| 326 |
|
|
| 327 |
|
if (method_exists($service, 'setValidators')) { |
| 328 |
|
$validatorConfig = $config->getValue($factoryKey . '/' . $serviceKey . '/validators'); |
| 329 |
|
if ($validatorConfig == null) { |
| 330 |
|
$validatorConfig = $config->getValue($factoryKey . '/default/validators'); |
| 331 |
|
} |
| 332 |
|
|
| 333 |
|
$validator = $this->buildServiceValidation($validatorConfig); |
| 334 |
|
if ($validator !== null) { |
| 335 |
|
$service->setValidators($validator); |
| 336 |
|
} |
| 337 |
|
} |
| 338 |
|
|
| 339 |
|
return $service; |