PHP code example of hamlet-framework / http-message-spec
1. Go to this page and download the library: Download hamlet-framework/http-message-spec 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/ */
hamlet-framework / http-message-spec example snippets
class MyRequestTest extends TestCase
{
...
protected function request(): RequestInterface
{
return new MyRequest('GET', new Uri());
}
protected function message(): MessageInterface
{
return $this->request();
}
protected function stream(): StreamInterface
{
return MyStream();
}
protected function uri(string $value): UriInterface
{
return new MyUri($value);
}