| 1 | <?php |
||
| 8 | abstract class AbstractTransport implements TransportInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var Interceptor |
||
| 12 | */ |
||
| 13 | protected $preRequest; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * AbstractTransport constructor. |
||
| 17 | */ |
||
| 18 | public function __construct() |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @return Interceptor |
||
| 25 | */ |
||
| 26 | public function onPreRequest(): Interceptor |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Execute request |
||
| 33 | * |
||
| 34 | * @param string $request |
||
| 35 | * |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | public function request(string $request): string |
||
| 43 | |||
| 44 | abstract public function send(string $request): string; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param string $request |
||
| 48 | * |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | private function preRequest(string $request): string |
||
| 61 | } |
||
| 62 |