trait BrowserHeadersTrait in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/jcalderonzumba/gastonjs/src/Browser/BrowserHeadersTrait.php \Zumba\GastonJS\Browser\BrowserHeadersTrait
Trait BrowserHeadersTrait @package Zumba\GastonJS\Browser
Hierarchy
- trait \Zumba\GastonJS\Browser\BrowserHeadersTrait
File
- vendor/
jcalderonzumba/ gastonjs/ src/ Browser/ BrowserHeadersTrait.php, line 9
Namespace
Zumba\GastonJS\BrowserView source
trait BrowserHeadersTrait {
/**
* Returns the headers of the current page that will be used the next request
* @return mixed
*/
public function getHeaders() {
return $this
->command('get_headers');
}
/**
* Given an array of headers, set such headers for the requests, removing all others
* @param array $headers
* @return mixed
*/
public function setHeaders($headers) {
return $this
->command('set_headers', $headers);
}
/**
* Adds headers to current page overriding the existing ones for the next requests
* @param $headers
* @return mixed
*/
public function addHeaders($headers) {
return $this
->command('add_headers', $headers);
}
/**
* Adds a header to the page making it permanent if needed
* @param $header
* @param $permanent
* @return mixed
*/
public function addHeader($header, $permanent = false) {
return $this
->command('add_header', $header, $permanent);
}
/**
* Gets the response headers after a request
* @return mixed
*/
public function responseHeaders() {
return $this
->command('response_headers');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BrowserHeadersTrait:: |
public | function | Adds a header to the page making it permanent if needed | |
BrowserHeadersTrait:: |
public | function | Adds headers to current page overriding the existing ones for the next requests | |
BrowserHeadersTrait:: |
public | function | Returns the headers of the current page that will be used the next request | |
BrowserHeadersTrait:: |
public | function | Gets the response headers after a request | |
BrowserHeadersTrait:: |
public | function | Given an array of headers, set such headers for the requests, removing all others |