1 | <?php |
||
20 | class Omnipay |
||
21 | { |
||
22 | /** |
||
23 | * @var GatewayFactory |
||
24 | */ |
||
25 | protected $gatewayFactory; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $config; |
||
31 | |||
32 | /** |
||
33 | * @var GatewayInterface[] |
||
34 | */ |
||
35 | protected $cache; |
||
36 | |||
37 | /** |
||
38 | * @var GatewayInterface[] |
||
39 | */ |
||
40 | protected $registeredGateways = []; |
||
41 | |||
42 | /** |
||
43 | * @var string[] |
||
44 | */ |
||
45 | protected $disabledGateways = []; |
||
46 | |||
47 | /** |
||
48 | * @var string |
||
49 | */ |
||
50 | protected $defaultGatewayName; |
||
51 | |||
52 | /** |
||
53 | * @var bool |
||
54 | */ |
||
55 | protected $initializeOnRegistration = false; |
||
56 | |||
57 | /** |
||
58 | * @param GatewayFactory $gatewayFactory |
||
59 | * @param array $config |
||
60 | */ |
||
61 | 9 | public function __construct(GatewayFactory $gatewayFactory, array $config = array()) |
|
66 | |||
67 | /** |
||
68 | * @param string $gatewayName |
||
69 | * |
||
70 | * @return GatewayInterface |
||
71 | */ |
||
72 | 8 | public function get($gatewayName) |
|
81 | |||
82 | /** |
||
83 | * @param GatewayInterface $gatewayInstance |
||
84 | * @param string|null $alias |
||
85 | */ |
||
86 | 3 | public function registerGateway(GatewayInterface $gatewayInstance, $alias = null) |
|
101 | |||
102 | /** |
||
103 | * @param string[] $disabledGateways |
||
104 | */ |
||
105 | 1 | public function setDisabledGateways(array $disabledGateways) |
|
109 | |||
110 | /** |
||
111 | * @return GatewayInterface |
||
112 | */ |
||
113 | 2 | public function getDefaultGateway() |
|
121 | |||
122 | /** |
||
123 | * @param string $defaultGatewayName |
||
124 | */ |
||
125 | 1 | public function setDefaultGatewayName($defaultGatewayName) |
|
129 | |||
130 | /** |
||
131 | * @param boolean $initializeOnRegistration |
||
132 | */ |
||
133 | public function initializeOnRegistration($initializeOnRegistration) |
||
137 | |||
138 | /** |
||
139 | * @param string $gatewayName |
||
140 | * @return GatewayInterface |
||
141 | */ |
||
142 | 8 | protected function createGateway($gatewayName) |
|
157 | |||
158 | /** |
||
159 | * @param string $gatewayName |
||
160 | * @return array |
||
161 | */ |
||
162 | 6 | protected function getGatewayConfig($gatewayName) |
|
166 | } |
||
167 |