1: <?php
2:
3: namespace webfilesframework\io\request;
4:
5: /**
6: * description
7: *
8: * @author Sebastian Monzel < mail@sebastianmonzel.de >
9: * @since 0.1.7
10: */
11: abstract class MAbstractHttpRequest
12: {
13:
14: protected $url;
15: protected $context;
16:
17: public function __construct($url, $data = null)
18: {
19: $this->url = $url;
20: $this->initContext($data);
21: }
22:
23: public function makeRequest()
24: {
25: return file_get_contents($this->url, false, $this->context);
26: }
27:
28: public abstract function initContext($data);
29:
30: }