Move the parseHttpHeader
function next to the parse
function.
This commit is contained in:
parent
1e20a86e4a
commit
a4d73971d3
@ -10,16 +10,6 @@ use Madeorsk\Forwarded\Exceptions\EmptyNodeNameException;
|
||||
*/
|
||||
class Parser
|
||||
{
|
||||
/**
|
||||
* Parse the HTTP header found in `$_SERVER["HTTP_FORWARDED"]`.
|
||||
* @return Forwarded - The parsed Forwarded header.
|
||||
* @throws EmptyNodeNameException
|
||||
*/
|
||||
public function parseHttpHeader(): Forwarded
|
||||
{
|
||||
return $this->parse($_SERVER["HTTP_FORWARDED"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* The currently reading forwards list.
|
||||
* @var array
|
||||
@ -94,6 +84,16 @@ class Parser
|
||||
return new Forwarded($this->parseAssoc($headerContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the HTTP header found in `$_SERVER["HTTP_FORWARDED"]`.
|
||||
* @return Forwarded - The parsed Forwarded header.
|
||||
* @throws EmptyNodeNameException
|
||||
*/
|
||||
public function parseHttpHeader(): Forwarded
|
||||
{
|
||||
return $this->parse($_SERVER["HTTP_FORWARDED"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reinitialize the parsing of a pair.
|
||||
* @return void
|
||||
|
Loading…
Reference in New Issue
Block a user