1 | <?php |
||
7 | abstract class MethodPluginBase implements MethodPluginInterface { |
||
8 | |||
9 | /** |
||
10 | * The method name. |
||
11 | */ |
||
12 | const METHOD = 'BASE'; |
||
13 | |||
14 | /** |
||
15 | * The parameters. |
||
16 | * |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $parameters; |
||
20 | |||
21 | /** |
||
22 | * The API Key. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $apiKey; |
||
27 | |||
28 | /** |
||
29 | * The API Version. |
||
30 | * |
||
31 | * @var int |
||
32 | */ |
||
33 | protected $apiVersion; |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | 24 | public function getMethod() { |
|
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | 24 | public function setParameters(array $parameters = array()) { |
|
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | 12 | public function getDefaultParameters() { |
|
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | 24 | public function getParameters() { |
|
88 | |||
89 | /** |
||
90 | 12 | * Get a random ID. |
|
91 | 12 | * |
|
92 | 12 | * @return int |
|
93 | */ |
||
94 | public function getRandomId() { |
||
97 | 24 | ||
98 | 24 | /** |
|
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function setApiVersion($apiVersion) { |
||
104 | 12 | ||
105 | 12 | /** |
|
106 | 12 | * {@inheritdoc} |
|
107 | */ |
||
108 | public function getApiVersion() { |
||
111 | 12 | ||
112 | 12 | /** |
|
113 | * {@inheritdoc} |
||
114 | */ |
||
115 | public function getResult(ResponseInterface $response) { |
||
120 | 13 | ||
121 | } |
||
122 |