for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Brendt\Stitcher\Site\Http;
class Header
{
/**
* @var string
*/
private $name;
private $content;
* Create a new header
*
* @param string $name
* @param string $content
* @return Header
public static function create(string $name, string $content) : Header {
return new self($name, $content);
}
* Create a Link header
public static function link(string $content) : Header {
return new self('Link', $content);
* Header constructor.
public function __construct(string $name, string $content) {
$this->name = $name;
$this->content = $content;
* Get the header as string for .htaccess files
* @return string
public function getHtaccessHeader() : string {
return "{$this->name} {$this->content}";
* Het the header as string
public function __toString() : string {
return "{$this->name}: {$this->content}";