Download the PHP package yiisoft/data-response without Composer
On this page you can find all versions of the php package yiisoft/data-response. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yiisoft/data-response
More information about yiisoft/data-response
Files in yiisoft/data-response
Package data-response
Short Description Allows responding with data that is automatically converted into PSR-7 response
License BSD-3-Clause
Homepage https://www.yiiframework.com/
Informations about the package data-response
Yii Data Response
The package allows responding with data that is automatically converted into PSR-7 response.
Requirements
- PHP 8.1 or higher.
DOM
PHP extension.
Installation
The package could be installed with Composer:
General usage
The package provides DataResponseFactory
class that, given a PSR-17
response factory, is able to create data response.
Data response contains raw data to be processed later.
Formatters
Formatter purpose is to format a data response. In the following example we format data as JSON.
The following formatters are available:
HtmlDataResponseFormatter
JsonDataResponseFormatter
XmlDataResponseFormatter
PlainTextDataResponseFormatter
Middleware
The package provides a PSR-15 middleware that is able to format a data response.
Also, the package provides PSR-15 middleware for content negotiation:
You can override middlewares with method withContentFormatters()
:
Documentation
- Internals
If you need help or have a question, the Yii Forum is a good place for that. You may also check out other Yii Community Resources.
License
The Yii Data Response is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Maintained by Yii Software.
Support the project
Follow updates
All versions of data-response with dependencies
ext-dom Version *
psr/http-factory Version ^1.0
psr/http-message Version ^1.0|^2.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
yiisoft/http Version ^1.2
yiisoft/json Version ^1.0
yiisoft/strings Version ^2.0