PHP code example of jeyroik / extas-http

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

    

jeyroik / extas-http example snippets


use extas\components\Item;
use extas\interfaces\http\IHasPsrRequest; 
/**
 * @var \Psr\Http\Message\RequestInterface $request
 */
$item = new class ([
        IHasHttpRequest::FIELD__PSR_REQUEST => $request
    ]) extends Item {
    use \extas\components\http\THasPsrRequest;
    
    protected function getSubjectForExtension() : string{
        return '';
    }
};

$item->getPsrRequest();