24 lines
540 B
PHP
24 lines
540 B
PHP
<?php
|
|
// ContentLocationHeader.php
|
|
// Created: 2022-02-14
|
|
// Updated: 2022-02-27
|
|
|
|
namespace Index\Http\Headers;
|
|
|
|
use Index\Http\HttpHeader;
|
|
|
|
class ContentLocationHeader {
|
|
private string $location;
|
|
|
|
public function __construct(string $location) {
|
|
$this->location = $location;
|
|
}
|
|
|
|
public function getLocation(): string {
|
|
return $this->location;
|
|
}
|
|
|
|
public static function parse(HttpHeader $header): ContentLocationHeader {
|
|
return new ContentLocationHeader(trim($header->getFirstLine()));
|
|
}
|
|
}
|