Input Stream bindings (#18)

* Initial aws_input_stream <-> php_stream implementation

* Added comments about useful references

* updated aws-crt-ffi to get latest aws-lc, faster builds

* Fixed inconsistency between PHP5/7 versions of php_stream_from_zval
This commit is contained in:
Justin Boswell
2021-03-19 13:29:14 -07:00
committed by GitHub
parent 73ecd3bc8a
commit 974fe3d74a
11 changed files with 441 additions and 49 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace AWS\CRT\HTTP;
abstract class Message {
private $path = "";
private $query = [];
private $headers = [];
public function __construct($path, $query = [], $headers = []) {
$this->path = $path;
$this->query = $query;
$this->headers = $headers;
}
}
class Request extends Message {
private $body_stream = null;
public function __construct($path, $query = [], $headers = [], $body_stream = null) {
parent::__construct($path, $query, $headers);
$this->body_stream = $body_stream;
}
}
class Response extends Message {
private $status_code;
public function __construct($path, $headers, $status_code) {
parent::__construct($path, [], $headers);
$this->status_code = $status_code;
}
}