pax_global_header00006660000000000000000000000064126352623650014524gustar00rootroot0000000000000052 comment=a478cb11f66a6ac48d8954216cfed9aa06a501a1 message-factory-1.0.2/000077500000000000000000000000001263526236500146155ustar00rootroot00000000000000message-factory-1.0.2/CHANGELOG.md000066400000000000000000000016021263526236500164250ustar00rootroot00000000000000# 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 message-factory-1.0.2/LICENSE000066400000000000000000000020651263526236500156250ustar00rootroot00000000000000Copyright (c) 2015 PHP HTTP Team 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. message-factory-1.0.2/README.md000066400000000000000000000020171263526236500160740ustar00rootroot00000000000000# 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. message-factory-1.0.2/composer.json000066400000000000000000000011741263526236500173420ustar00rootroot00000000000000{ "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" } } } message-factory-1.0.2/puli.json000066400000000000000000000025711263526236500164660ustar00rootroot00000000000000{ "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" } } } } } message-factory-1.0.2/src/000077500000000000000000000000001263526236500154045ustar00rootroot00000000000000message-factory-1.0.2/src/MessageFactory.php000066400000000000000000000003241263526236500210300ustar00rootroot00000000000000 */ interface MessageFactory extends RequestFactory, ResponseFactory { } message-factory-1.0.2/src/RequestFactory.php000066400000000000000000000014731263526236500211020ustar00rootroot00000000000000 */ 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' ); } message-factory-1.0.2/src/ResponseFactory.php000066400000000000000000000016301263526236500212430ustar00rootroot00000000000000 */ 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' ); } message-factory-1.0.2/src/StreamFactory.php000066400000000000000000000010571263526236500207030ustar00rootroot00000000000000 */ 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); } message-factory-1.0.2/src/UriFactory.php000066400000000000000000000007121263526236500202040ustar00rootroot00000000000000 */ 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); }