Imported into new repository.
This commit is contained in:
commit
ac2255d24d
187 changed files with 15021 additions and 0 deletions
src/Http/Headers
28
src/Http/Headers/AccessControlRequestMethodHeader.php
Normal file
28
src/Http/Headers/AccessControlRequestMethodHeader.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
// AccessControlRequestMethodHeader.php
|
||||
// Created: 2022-02-14
|
||||
// Updated: 2022-02-27
|
||||
|
||||
namespace Index\Http\Headers;
|
||||
|
||||
use Index\Http\HttpHeader;
|
||||
|
||||
class AccessControlRequestMethodHeader {
|
||||
private string $method;
|
||||
|
||||
public function __construct(string $method) {
|
||||
$this->method = $method;
|
||||
}
|
||||
|
||||
public function getMethod(): string {
|
||||
return $this->method;
|
||||
}
|
||||
|
||||
public function isMethod(string $method): bool {
|
||||
return $this->method === strtolower($method);
|
||||
}
|
||||
|
||||
public static function parse(HttpHeader $header): AccessControlRequestMethodHeader {
|
||||
return new AccessControlRequestMethodHeader(strtolower(trim($header->getFirstLine())));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue