summaryrefslogtreecommitdiff
path: root/inc/mailgun/php-http/message-factory
diff options
context:
space:
mode:
authorCarson Fleming <cflems@cflems.net>2017-03-02 22:49:24 -0500
committerCarson Fleming <cflems@cflems.net>2017-03-02 22:49:24 -0500
commitb76e2ff898b23745d4c9aaee49eeb7d88f2896ab (patch)
tree9b794be8db310a575d70165d9ebde0a183b61b01 /inc/mailgun/php-http/message-factory
parentbfcc9f7a7656a2db0c905b3c13114664f00f6c37 (diff)
downloadbulletin-b76e2ff898b23745d4c9aaee49eeb7d88f2896ab.tar.gz
Updated mailgun plugin
Diffstat (limited to 'inc/mailgun/php-http/message-factory')
-rw-r--r--inc/mailgun/php-http/message-factory/CHANGELOG.md65
-rw-r--r--inc/mailgun/php-http/message-factory/LICENSE19
-rw-r--r--inc/mailgun/php-http/message-factory/README.md36
-rw-r--r--inc/mailgun/php-http/message-factory/composer.json27
-rw-r--r--inc/mailgun/php-http/message-factory/puli.json43
-rw-r--r--inc/mailgun/php-http/message-factory/src/MessageFactory.php12
-rw-r--r--inc/mailgun/php-http/message-factory/src/RequestFactory.php34
-rw-r--r--inc/mailgun/php-http/message-factory/src/ResponseFactory.php35
-rw-r--r--inc/mailgun/php-http/message-factory/src/StreamFactory.php25
-rw-r--r--inc/mailgun/php-http/message-factory/src/UriFactory.php24
10 files changed, 320 insertions, 0 deletions
diff --git a/inc/mailgun/php-http/message-factory/CHANGELOG.md b/inc/mailgun/php-http/message-factory/CHANGELOG.md
new file mode 100644
index 0000000..4711924
--- /dev/null
+++ b/inc/mailgun/php-http/message-factory/CHANGELOG.md
@@ -0,0 +1,65 @@
+# Change Log
+
+
+## 1.0.2 - 2015-12-19
+
+### Added
+
+- Request and Response factory binding types to Puli
+
+
+## 1.0.1 - 2015-12-17
+
+### Added
+
+- Puli configuration and binding types
+
+
+## 1.0.0 - 2015-12-15
+
+### Added
+
+- Response Factory in order to be reused in Message and Server Message factories
+- Request Factory
+
+### Changed
+
+- Message Factory extends Request and Response factories
+
+
+## 1.0.0-RC1 - 2015-12-14
+
+### Added
+
+- CS check
+
+### Changed
+
+- RuntimeException is thrown when the StreamFactory cannot write to the underlying stream
+
+
+## 0.3.0 - 2015-11-16
+
+### Removed
+
+- Client Context Factory
+- Factory Awares and Templates
+
+
+## 0.2.0 - 2015-11-16
+
+### Changed
+
+- Reordered the parameters when creating a message to have the protocol last,
+as its the least likely to need to be changed.
+
+
+## 0.1.0 - 2015-06-01
+
+### Added
+
+- Initial release
+
+### Changed
+
+- Helpers are renamed to templates
diff --git a/inc/mailgun/php-http/message-factory/LICENSE b/inc/mailgun/php-http/message-factory/LICENSE
new file mode 100644
index 0000000..8e2c4a0
--- /dev/null
+++ b/inc/mailgun/php-http/message-factory/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015 PHP HTTP Team <team@php-http.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/inc/mailgun/php-http/message-factory/README.md b/inc/mailgun/php-http/message-factory/README.md
new file mode 100644
index 0000000..4654495
--- /dev/null
+++ b/inc/mailgun/php-http/message-factory/README.md
@@ -0,0 +1,36 @@
+# PSR-7 Message Factory
+
+[![Latest Version](https://img.shields.io/github/release/php-http/message-factory.svg?style=flat-square)](https://github.com/php-http/message-factory/releases)
+[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
+[![Total Downloads](https://img.shields.io/packagist/dt/php-http/message-factory.svg?style=flat-square)](https://packagist.org/packages/php-http/message-factory)
+
+**Factory interfaces for PSR-7 HTTP Message.**
+
+
+## Install
+
+Via Composer
+
+``` bash
+$ composer require php-http/message-factory
+```
+
+
+## Documentation
+
+Please see the [official documentation](http://php-http.readthedocs.org/en/latest/message-factory/).
+
+
+## Contributing
+
+Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
+
+
+## Security
+
+If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org).
+
+
+## License
+
+The MIT License (MIT). Please see [License File](LICENSE) for more information.
diff --git a/inc/mailgun/php-http/message-factory/composer.json b/inc/mailgun/php-http/message-factory/composer.json
new file mode 100644
index 0000000..7c72feb
--- /dev/null
+++ b/inc/mailgun/php-http/message-factory/composer.json
@@ -0,0 +1,27 @@
+{
+ "name": "php-http/message-factory",
+ "description": "Factory interfaces for PSR-7 HTTP Message",
+ "license": "MIT",
+ "keywords": ["http", "factory", "message", "stream", "uri"],
+ "homepage": "http://php-http.org",
+ "authors": [
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar@gmail.com"
+ }
+ ],
+ "require": {
+ "php": ">=5.4",
+ "psr/http-message": "^1.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Http\\Message\\": "src/"
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ }
+}
diff --git a/inc/mailgun/php-http/message-factory/puli.json b/inc/mailgun/php-http/message-factory/puli.json
new file mode 100644
index 0000000..08d3762
--- /dev/null
+++ b/inc/mailgun/php-http/message-factory/puli.json
@@ -0,0 +1,43 @@
+{
+ "version": "1.0",
+ "binding-types": {
+ "Http\\Message\\MessageFactory": {
+ "description": "PSR-7 Message Factory",
+ "parameters": {
+ "depends": {
+ "description": "Optional class dependency which can be checked by consumers"
+ }
+ }
+ },
+ "Http\\Message\\RequestFactory": {
+ "parameters": {
+ "depends": {
+ "description": "Optional class dependency which can be checked by consumers"
+ }
+ }
+ },
+ "Http\\Message\\ResponseFactory": {
+ "parameters": {
+ "depends": {
+ "description": "Optional class dependency which can be checked by consumers"
+ }
+ }
+ },
+ "Http\\Message\\StreamFactory": {
+ "description": "PSR-7 Stream Factory",
+ "parameters": {
+ "depends": {
+ "description": "Optional class dependency which can be checked by consumers"
+ }
+ }
+ },
+ "Http\\Message\\UriFactory": {
+ "description": "PSR-7 URI Factory",
+ "parameters": {
+ "depends": {
+ "description": "Optional class dependency which can be checked by consumers"
+ }
+ }
+ }
+ }
+}
diff --git a/inc/mailgun/php-http/message-factory/src/MessageFactory.php b/inc/mailgun/php-http/message-factory/src/MessageFactory.php
new file mode 100644
index 0000000..965aaa8
--- /dev/null
+++ b/inc/mailgun/php-http/message-factory/src/MessageFactory.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Http\Message;
+
+/**
+ * Factory for PSR-7 Request and Response.
+ *
+ * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
+ */
+interface MessageFactory extends RequestFactory, ResponseFactory
+{
+}
diff --git a/inc/mailgun/php-http/message-factory/src/RequestFactory.php b/inc/mailgun/php-http/message-factory/src/RequestFactory.php
new file mode 100644
index 0000000..624e82f
--- /dev/null
+++ b/inc/mailgun/php-http/message-factory/src/RequestFactory.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Http\Message;
+
+use Psr\Http\Message\UriInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Factory for PSR-7 Request.
+ *
+ * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
+ */
+interface RequestFactory
+{
+ /**
+ * Creates a new PSR-7 request.
+ *
+ * @param string $method
+ * @param string|UriInterface $uri
+ * @param array $headers
+ * @param resource|string|StreamInterface|null $body
+ * @param string $protocolVersion
+ *
+ * @return RequestInterface
+ */
+ public function createRequest(
+ $method,
+ $uri,
+ array $headers = [],
+ $body = null,
+ $protocolVersion = '1.1'
+ );
+}
diff --git a/inc/mailgun/php-http/message-factory/src/ResponseFactory.php b/inc/mailgun/php-http/message-factory/src/ResponseFactory.php
new file mode 100644
index 0000000..2411ed3
--- /dev/null
+++ b/inc/mailgun/php-http/message-factory/src/ResponseFactory.php
@@ -0,0 +1,35 @@
+<?php
+
+namespace Http\Message;
+
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Factory for PSR-7 Response.
+ *
+ * This factory contract can be reused in Message and Server Message factories.
+ *
+ * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
+ */
+interface ResponseFactory
+{
+ /**
+ * Creates a new PSR-7 response.
+ *
+ * @param int $statusCode
+ * @param string|null $reasonPhrase
+ * @param array $headers
+ * @param resource|string|StreamInterface|null $body
+ * @param string $protocolVersion
+ *
+ * @return ResponseInterface
+ */
+ public function createResponse(
+ $statusCode = 200,
+ $reasonPhrase = null,
+ array $headers = [],
+ $body = null,
+ $protocolVersion = '1.1'
+ );
+}
diff --git a/inc/mailgun/php-http/message-factory/src/StreamFactory.php b/inc/mailgun/php-http/message-factory/src/StreamFactory.php
new file mode 100644
index 0000000..327a902
--- /dev/null
+++ b/inc/mailgun/php-http/message-factory/src/StreamFactory.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Http\Message;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Factory for PSR-7 Stream.
+ *
+ * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
+ */
+interface StreamFactory
+{
+ /**
+ * Creates a new PSR-7 stream.
+ *
+ * @param string|resource|StreamInterface|null $body
+ *
+ * @return StreamInterface
+ *
+ * @throws \InvalidArgumentException If the stream body is invalid.
+ * @throws \RuntimeException If creating the stream from $body fails.
+ */
+ public function createStream($body = null);
+}
diff --git a/inc/mailgun/php-http/message-factory/src/UriFactory.php b/inc/mailgun/php-http/message-factory/src/UriFactory.php
new file mode 100644
index 0000000..f05e625
--- /dev/null
+++ b/inc/mailgun/php-http/message-factory/src/UriFactory.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Http\Message;
+
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Factory for PSR-7 URI.
+ *
+ * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
+ */
+interface UriFactory
+{
+ /**
+ * Creates an PSR-7 URI.
+ *
+ * @param string|UriInterface $uri
+ *
+ * @return UriInterface
+ *
+ * @throws \InvalidArgumentException If the $uri argument can not be converted into a valid URI.
+ */
+ public function createUri($uri);
+}