| 1 | <?php |
||
| 8 | abstract class OrtcRequest |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var OrtcConfig |
||
| 12 | */ |
||
| 13 | private $ortcConfig; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * get url path (not base url). |
||
| 17 | * |
||
| 18 | * @return string |
||
| 19 | */ |
||
| 20 | abstract public function getUrlPath(); |
||
| 21 | |||
| 22 | /** |
||
| 23 | * is post request or get request? |
||
| 24 | * |
||
| 25 | * @return bool |
||
| 26 | */ |
||
| 27 | abstract public function isPost(); |
||
| 28 | |||
| 29 | /** |
||
| 30 | * get post body. |
||
| 31 | * |
||
| 32 | * @return array |
||
| 33 | */ |
||
| 34 | abstract public function getPostData(); |
||
| 35 | |||
| 36 | /** |
||
| 37 | * get response handler. |
||
| 38 | * |
||
| 39 | * @return OrtcResponseHandler |
||
| 40 | */ |
||
| 41 | abstract public function getResponseHandler(); |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return OrtcConfig |
||
| 45 | */ |
||
| 46 | 6 | public function getOrtcConfig() |
|
| 50 | |||
| 51 | /** |
||
| 52 | * @param OrtcConfig $ortcConfig |
||
| 53 | * |
||
| 54 | * @return $this |
||
| 55 | */ |
||
| 56 | 6 | public function setOrtcConfig($ortcConfig) |
|
| 62 | |||
| 63 | /** |
||
| 64 | * is absolute url? |
||
| 65 | * |
||
| 66 | * @return bool |
||
| 67 | */ |
||
| 68 | 3 | public function isUrlAbsolute() |
|
| 72 | } |
||
| 73 |