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 | public function request() :ResponseInterface |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function withEndPoint(string $endpoint) :ProviderInterface |
||
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | public static function withResource(string $resource) :ProviderInterface |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function withParameters(array $parameters) :ProviderInterface |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | public function getEndPoint() :string |
||
108 | |||
109 | /** |
||
110 | * {@inheritdoc} |
||
111 | */ |
||
112 | public function getParameters() :array |
||
116 | |||
117 | /** |
||
118 | * {@inheritdoc} |
||
119 | */ |
||
120 | public function getResource() :string |
||
124 | } |
||
125 |