| 1 |
<?php |
| 2 |
/** |
| 3 |
* Creates a header instance with HTTP response headers. |
| 4 |
* |
| 5 |
* @since 1.0.0 |
| 6 |
* |
| 7 |
* @package SolidWP\Performance |
| 8 |
*/ |
| 9 |
|
| 10 |
declare( strict_types=1 ); |
| 11 |
|
| 12 |
namespace SolidWP\Performance\Http; |
| 13 |
|
| 14 |
/** |
| 15 |
* Creates a header instance using HTTP response headers. |
| 16 |
* |
| 17 |
* @since 1.0.0 |
| 18 |
* |
| 19 |
* @package SolidWP\Performance |
| 20 |
*/ |
| 21 |
class Header_Factory { |
| 22 |
|
| 23 |
/** |
| 24 |
* Make a header instance using HTTP response headers. |
| 25 |
* |
| 26 |
* @note headers_list() does not work in CLI. |
| 27 |
* |
| 28 |
* @return Header |
| 29 |
*/ |
| 30 |
public function make(): Header { |
| 31 |
$headers = headers_list(); |
| 32 |
|
| 33 |
return new Header( $headers ); |
| 34 |
} |
| 35 |
} |
| 36 |
|