Remove server push header method, as support is virtually non-existent
This commit is contained in:
parent
f5b29e8f17
commit
ab763252aa
13
src/View.php
13
src/View.php
@ -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
|
||||||
*
|
*
|
||||||
|
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user