Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

kdubuc/invocator-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Invoke PHP

<?php

require_once __DIR__.'/vendor/autoload.php';

use function Kdubuc\Invocator\invoke;
use My\Custom\RequestHandler;

$action = new RequestHandler();

invoke($action, STDIN, STDOUT);

Invoke's job is to marshal a raw HTTP request incomming into its input resource to build a PSR-7 ServerRequest object, invoke your chosen PSR-15 RequestHandler with that, and to respond with a raw HTTP Response message issued by the RequestHandler.

Invoke uses stdio as an interface between the API gateway and your RequestHandler.

Can be useful in a Serverless context (API Gateway -> Tiny HTTP server like kdubuc/watchdog -> Invoke).

About

Handles HTTP requests using stdio

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages