-
-
Notifications
You must be signed in to change notification settings - Fork 243
/
Copy pathAbstractAccountGateway.php
71 lines (67 loc) · 1.33 KB
/
AbstractAccountGateway.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
<?php
/**
* Base Account Gateway class
*/
namespace Omnipay\Common;
/**
* Base user gateway class
*
* This abstract class should be extended by all account gatways
* throughout the Omnipay system. It enforces implementation of
* the GatewayInterface interface and defines a few common attributes
* and methods that all gateways should have.
*
* Example:
*
* <code>
* // Initialize the gateway
* $gateway->initialize(...);
*
* // Get the gateway parameters
* $parameters = $gateway->getParameters();
*
* // lookup a user by access token
* if ($gateway->supportsFind()) {
*
* }
* </code>
*/
abstract class AbstractAccountGateway extends AbstractGateway
{
/**
* Supports Find
*
* @return string
*/
public function supportsFind()
{
return method_exists($this, 'find');
}
/**
* Supports create
*
* @return string
*/
public function supportsCreate()
{
return method_exists($this, 'create');
}
/**
* Supports Modify
*
* @return string
*/
public function supportsModify()
{
return method_exists($this, 'modify');
}
/**
* Supports Delete
*
* @return string
*/
public function supportsDelete()
{
return method_exists($this, 'delete');
}
}