2017 © Pedro Peláez
 

library fastcgi

An effective FastCGI to psr-7 adapter

image

garveen/fastcgi

An effective FastCGI to psr-7 adapter

  • Sunday, March 12, 2017
  • by acabin
  • Repository
  • 2 Watchers
  • 5 Stars
  • 5,523 Installations
  • PHP
  • 8 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 9 % Grown

The README.md

README

This library is an effective FastCGI to PSR-7 adapter., (*1)

Install

composer require garveen/fastcgi

Usage

use Garveen\FastCgi\FastCgi;
use Psr\Http\Message\ServerRequestInterface;

// First of all, define 3 callbacks

// When a request is ready, this library will call $requestCallback:
$requestCallback = function (ServerRequestInterface $serverRequest) {
    // Do something...
    // And the response must be instance of Psr\Http\Message\ResponseInterface
    // This library provides Garveen\FastCgi\Response
    return new Response;
};

// After this library got the response, $sendCallback will be called:
$sendCallback = function (int $fd, string $data) {
    // send $data to downstream
    fwrite($downstreams[$fd], $data);
};

// At the end, if keepalive is not set, there will be $closeCallback:
$closeCallback = function (int $fd) {
    fclose($downstreams[$fd]);
};

// The instance
$fastcgi = new FastCgi($requestCallback, $sendCallback, $closeCallback, $logger);

// Once you have recevied a FastCGI network-package, just pass it to the instance:
$fastcgi->receive(int $fd, string $data);

The Versions

12/03 2017

dev-master

9999999-dev

An effective FastCGI to psr-7 adapter

  Sources   Download

MIT

The Requires

 

by Gavin

psr-7 psr7 fastcgi

12/03 2017

0.1.2

0.1.2.0

An effective FastCGI to psr-7 adapter

  Sources   Download

MIT

The Requires

 

by Gavin

psr-7 psr7 fastcgi

15/02 2017

0.1.1

0.1.1.0

An effective FastCGI to psr-7 adapter

  Sources   Download

MIT

The Requires

 

by Gavin

psr-7 psr7 fastcgi

25/01 2017

0.1.0

0.1.0.0

An effective FastCGI to psr-7 adapter

  Sources   Download

MIT

The Requires

 

by Gavin

psr-7 psr7 fastcgi