| 1 | <?php |
||
| 12 | abstract class AbstractTransport implements TransportInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * This is what the transport will point. Can be an url or a path (depends |
||
| 16 | * what transport you use, cURL or Shell) |
||
| 17 | * |
||
| 18 | * @var string $endpoint Url or Path |
||
| 19 | */ |
||
| 20 | protected $endpoint; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Construct the object |
||
| 24 | * |
||
| 25 | * @param string $endpoint to paybox endpoint |
||
| 26 | */ |
||
| 27 | public function __construct($endpoint = '') |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Define the endpoint. It can be an url or a path, depends what control you |
||
| 34 | * choose. |
||
| 35 | * |
||
| 36 | * @param string $endpoint to paybox endpoint |
||
| 37 | */ |
||
| 38 | public function setEndpoint($endpoint) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Get the paybox endpoint. |
||
| 49 | * |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | public function getEndpoint() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Perform a call |
||
| 59 | * |
||
| 60 | * @throws \RuntimeException If no endpoint defined |
||
| 61 | */ |
||
| 62 | protected function checkEndpoint() |
||
| 68 | } |
||
| 69 |