Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
54 | public function respond($status, $body, $headers = []) |
||
55 | { |
||
56 | if (empty($headers)) { |
||
57 | // this is required to represent empty header set as map and not as array |
||
58 | $headers = new \stdClass(); |
||
59 | } |
||
60 | |||
61 | $this->getWorker()->send( |
||
62 | $body, |
||
63 | json_encode(['status' => $status, 'headers' => $headers]) |
||
64 | ); |
||
65 | } |
||
66 | } |
||
67 |