PHP code example of davidecesarano / embryo-middleware
1. Go to this page and download the library: Download davidecesarano/embryo-middleware 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/ */
davidecesarano / embryo-middleware example snippets
use Embryo\Http\Server\RequestHandler;
use Embryo\Http\Factory\{ServerRequestFactory, ResponseFactory};
use Middlewares\{Uuid, ResponseTime};
use Psr\Http\Message\ServerRequestInterface;
// PSR-7 implementation
$request = (new ServerRequestFactory)->createServerRequestFromServer();
$response = (new ResponseFactory)->createResponse(200);