Initial commit
This commit is contained in:
57
src/Request.php
Normal file
57
src/Request.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace JoopSchilder\Http2;
|
||||
|
||||
/**
|
||||
* Class Request
|
||||
*/
|
||||
class Request
|
||||
{
|
||||
/** @var string */
|
||||
private $uri;
|
||||
|
||||
/** @var array */
|
||||
private $options;
|
||||
|
||||
|
||||
/**
|
||||
* Request constructor.
|
||||
* @param string $uri
|
||||
*/
|
||||
public function __construct(string $uri)
|
||||
{
|
||||
$this->uri = $uri;
|
||||
$this->options = [];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getUri(): string
|
||||
{
|
||||
return $this->uri;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getOptions(): array
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $options
|
||||
* @return Request
|
||||
*/
|
||||
public function setOptions(array $options)
|
||||
{
|
||||
$this->options = array_replace($this->options, $options);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user