@@ 23-38 (lines=16) @@ | ||
20 | ||
21 | class BridgeFactory |
|
22 | { |
|
23 | public static function getChronosBridge( |
|
24 | ApiClientInterface $oApiClient, |
|
25 | CacheInterface $oCache, |
|
26 | JobValidatorServiceInterface $oJobEntityValidatorService, |
|
27 | LoggerInterface $oLogger |
|
28 | ) |
|
29 | { |
|
30 | if ($oApiClient->ping()) |
|
31 | { |
|
32 | return new BridgeChronos( |
|
33 | $oApiClient, |
|
34 | $oCache, |
|
35 | $oJobEntityValidatorService, |
|
36 | $oLogger); |
|
37 | } |
|
38 | ||
39 | return new DummyBridge($oLogger); |
|
40 | } |
|
41 | ||
@@ 42-57 (lines=16) @@ | ||
39 | return new DummyBridge($oLogger); |
|
40 | } |
|
41 | ||
42 | public static function getMarathonBridge( |
|
43 | ApiClientInterface $oApiClient, |
|
44 | CacheInterface $oCache, |
|
45 | JobValidatorServiceInterface $oJobEntityValidatorService, |
|
46 | LoggerInterface $oLogger |
|
47 | ) |
|
48 | { |
|
49 | if ($oApiClient->ping()) |
|
50 | { |
|
51 | return new BridgeMarathon( |
|
52 | $oApiClient, |
|
53 | $oCache, |
|
54 | $oJobEntityValidatorService, |
|
55 | $oLogger); |
|
56 | } |
|
57 | ||
58 | return new DummyBridge($oLogger); |
|
59 | } |
|
60 |