Skip to content

FyreHeader is a free, open-source HTTP header library for PHP.

License

Notifications You must be signed in to change notification settings

elusivecodes/FyreHeader

Repository files navigation

FyreHeader

FyreHeader is a free, open-source immutable HTTP header library for PHP.

Table Of Contents

Installation

Using Composer

composer require fyre/header

In PHP:

use Fyre\Http\Header;

Header Creation

  • $name is a string representing the header name.
  • $value is a string or array representing the header value.
$header = new Header($name, $value);

Methods

Append Value

Append a value to the header.

  • $value is a string representing the value to append.
$newHeader = $header->appendValue($value);

Get Header String

Get the header string.

$headerString = $header->getHeaderString();

Get Name

Get the header name.

$name = $header->getName();

Get Value

Get the header value.

$value = $header->getValue();

Get Value String

Get the header value as a string.

$value = $header->getValueString();

Prepend Value

Prepend a value to the header.

  • $value is a string representing the value to prepend.
$newHeader = $header->prependValue($value);

Set Value

Set the header value.

  • $value is a string representing the header value.
$newHeader = $header->setValue($value);

About

FyreHeader is a free, open-source HTTP header library for PHP.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages