diff --git a/src/View.php b/src/View.php index 102b5ab..f8a4bbb 100644 --- a/src/View.php +++ b/src/View.php @@ -98,19 +98,6 @@ abstract class View 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 * diff --git a/src/ViewInterface.php b/src/ViewInterface.php index 8e5858b..27aabed 100644 --- a/src/ViewInterface.php +++ b/src/ViewInterface.php @@ -47,6 +47,15 @@ interface ViewInterface { */ 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 * render view or send headers.