symbiotic/http-response-mutable

Mutable response, the decorator is made to work with the response object via a Psr container

Installs: 114

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/symbiotic/http-response-mutable

1.4.0 2022-09-11 02:31 UTC

This package is auto-updated.

Last update: 2025-10-11 09:29:57 UTC


README

Warning

Widespread use of this decorator is not recommended! We use it to transfer it to controllers via a DI container.

Features

  • Compatible with PSR-7 (Http Message)
  • Simple class
  • php 7.2+

Installation

composer require symbiotic/http-response-mutable 

Usage

Mutable response, the decorator is made to work with the response object via a Psr container.

/**
 * @var  \Psr\Http\Message\ResponseInterface $response
 **/
$response = $psr_response_instance;

$responseMutable  = new Symbiotic\Http\ResponseMutable($response);
 /**
  *  your object changes...
  **/
// Getting the original object
$response  = $responseMutable->getRealInstance();