PHP code example of mindplay / sapi-host
1. Go to this page and download the library: Download mindplay/sapi-host library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mindplay / sapi-host example snippets
use mindplay\host\SapiHost;
use Nyholm\Psr7\Factory\Psr17Factory;
$factory = new Psr17Factory();
$host = new SapiHost(
$factory,
$factory,
$factory,
$factory
);
$host->dispatch(new YourRequestHandler());