Skip to content

Commit

Permalink
header location
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisGalliano committed Feb 4, 2020
1 parent 12eac30 commit 2d29486
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/Http/Response/Redirect/Headers/LocationHeader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?
declare(strict_types=1);

namespace Pion\Http\Response\Redirect\Headers;

use Pion\Http\Response\Headers\HeaderInterface;
use Psr\Http\Message\UriInterface;

class LocationHeader implements HeaderInterface
{
/**
* @var UriInterface
*/
private $uri;

public function __construct(UriInterface $uri) {
$this->uri = $uri;
}

public function name(): string
{
return 'Location';
}

public function value(): string
{
return $this->uri->__toString();
}
}

0 comments on commit 2d29486

Please sign in to comment.