PHP code example of effectra / contracts

1. Go to this page and download the library: Download effectra/contracts 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/ */

    

effectra / contracts example snippets


use Effectra\Contracts\Http\RequestFoundationInterface;
use Psr\Http\Message\ServerRequestInterface;

class MyRequestFoundation implements RequestFoundationInterface
{
    public static function createFromGlobals(): ServerRequestInterface
    {
        // Implement your logic here to create and return a ServerRequestInterface instance from global variables
    }
}