-
Notifications
You must be signed in to change notification settings - Fork 22
/
Payum.php
97 lines (81 loc) · 2.03 KB
/
Payum.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
namespace Payum\Core;
use Payum\Core\Registry\RegistryInterface;
use Payum\Core\Security\GenericTokenFactoryInterface;
use Payum\Core\Security\HttpRequestVerifierInterface;
use Payum\Core\Storage\StorageInterface;
class Payum implements RegistryInterface
{
/**
* @var RegistryInterface
*/
protected $registry;
/**
* @var HttpRequestVerifierInterface
*/
protected $httpRequestVerifier;
/**
* @var GenericTokenFactoryInterface
*/
protected $tokenFactory;
/**
* @var StorageInterface
*/
protected $tokenStorage;
public function __construct(
RegistryInterface $registry,
HttpRequestVerifierInterface $httpRequestVerifier,
GenericTokenFactoryInterface $tokenFactory,
StorageInterface $tokenStorage
) {
$this->registry = $registry;
$this->httpRequestVerifier = $httpRequestVerifier;
$this->tokenFactory = $tokenFactory;
$this->tokenStorage = $tokenStorage;
}
public function getGatewayFactory($name)
{
return $this->registry->getGatewayFactory($name);
}
public function getGatewayFactories()
{
return $this->registry->getGatewayFactories();
}
public function getGateway($name)
{
return $this->registry->getGateway($name);
}
public function getGateways()
{
return $this->registry->getGateways();
}
public function getStorage($class)
{
return $this->registry->getStorage($class);
}
public function getStorages()
{
return $this->registry->getStorages();
}
/**
* @return HttpRequestVerifierInterface
*/
public function getHttpRequestVerifier()
{
return $this->httpRequestVerifier;
}
/**
* @return GenericTokenFactoryInterface
*/
public function getTokenFactory()
{
return $this->tokenFactory;
}
/**
* @return StorageInterface
*/
public function getTokenStorage()
{
return $this->tokenStorage;
}
}