quimcalpe/psr7-response-sender

PSR-7 Response Sender

0.1.3 2016-05-20 14:26 UTC

This package is auto-updated.

Last update: 2024-04-05 00:41:11 UTC


README

Version License Build Status

Sends PSR-7 Response compatible object's content and headers to browser.

Install

Via Composer

$ composer require quimcalpe/psr7-response-sender

Requirements

The following versions of PHP are supported by this version.

  • PHP 5.5
  • PHP 5.6
  • PHP 7
  • HHVM

Basic Usage

// Require composer autoloader
require __DIR__ . '/vendor/autoload.php';

// $response must be Psr\Http\Message\ResponseInterface compatible
QuimCalpe\ResponseSender\send($response);

With PHP 5.6 you can import the function straight away:

use function QuimCalpe\ResponseSender\send AS send_response;

send_response($response);

Testing

$ vendor/bin/phpunit

License

The MIT License (MIT). Please see License File for more information.