Remove server push header method, as support is virtually non-existent

This commit is contained in:
Timothy Warren 2017-04-13 14:27:37 -04:00
parent f5b29e8f17
commit ab763252aa
2 changed files with 9 additions and 13 deletions

View File

@ -98,19 +98,6 @@ abstract class View
return $this; return $this;
} }
/**
* Add an http2 server push header
*
* @param string $path - The host-relative path to the asset
* @param string $type - The type of asset
* @return ViewInterface
*/
public function addPushHeader(string $path, string $type): ViewInterface
{
$this->addHeader('Link', "<{$path}>; rel=preload; as={$type}");
return $this;
}
/** /**
* Set the output string * Set the output string
* *

View File

@ -47,6 +47,15 @@ interface ViewInterface {
*/ */
public function appendOutput(string $string): self; public function appendOutput(string $string): self;
/**
* Add an http header
*
* @param string $name
* @param string|string[] $value
* @return ViewInterface
*/
public function addHeader(string $name, $value): self;
/** /**
* Get the current output as a string. Does not * Get the current output as a string. Does not
* render view or send headers. * render view or send headers.