| 1 | <?php |
||
| 10 | class PayloadFactory |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $baseUrl; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * PayloadFactory constructor. |
||
| 19 | * @param string $baseUrl |
||
| 20 | */ |
||
| 21 | public function __construct($baseUrl) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $path |
||
| 28 | * @return Payload |
||
| 29 | */ |
||
| 30 | public function post($path) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param string $path |
||
| 37 | * @return Payload |
||
| 38 | */ |
||
| 39 | public function put($path) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $path |
||
| 46 | * @return Payload |
||
| 47 | */ |
||
| 48 | public function get($path) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $path |
||
| 55 | * @param string $method |
||
| 56 | * @return Payload |
||
| 57 | */ |
||
| 58 | public function createPayload($path, $method) |
||
| 62 | } |