1 | <?php |
||
11 | abstract class AbstractProvider extends AbstractClient implements ProviderInterface |
||
12 | { |
||
13 | /** |
||
14 | * The endpoint. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | private $endpoint = ''; |
||
19 | |||
20 | /** |
||
21 | * The parameters. |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | private $parameters = []; |
||
26 | |||
27 | /** |
||
28 | * The random.org resource. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | private $resource; |
||
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | */ |
||
37 | 4 | public function request() :ResponseInterface |
|
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | 4 | public function withEndPoint(string $endpoint) :ProviderInterface |
|
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | 9 | public static function withResource(string $resource) :ProviderInterface |
|
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | 9 | public function withParameters(array $parameters) :ProviderInterface |
|
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | 4 | public function getEndPoint() :string |
|
106 | |||
107 | /** |
||
108 | * {@inheritdoc} |
||
109 | */ |
||
110 | 4 | public function getParameters() :array |
|
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | 4 | public function getResource() :string |
|
122 | } |
||
123 |