PluginProbe
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution / 1.5.0
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution v1.5.0
2.0.1 trunk 1.0.0 1.1.0 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 1.6.1 1.7.0 1.7.1 1.8.0 1.9.0 2.0.0
solid-performance / src / Performance / Page_Cache / Compression / Traits / With_Headers.php

With_Headers.php in Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution 1.5.0, at src/Performance/Page_Cache/Compression/Traits/With_Headers.php

30 lines 588 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Header trait for shared compressor functionality.
4 *
5 * @package SolidWP\Performance
6 */
7
8 declare( strict_types=1 );
9
10 namespace SolidWP\Performance\Page_Cache\Compression\Traits;
11
12 use SolidWP\Performance\Page_Cache\Compression\Contracts\Compressible;
13
14 /**
15 * Header trait for shared compressor functionality.
16 *
17 * @mixin Compressible
18 */
19 trait With_Headers {
20
21 /**
22 * Send Content-Encoding headers for the current compression strategy.
23 *
24 * @return void
25 */
26 public function send_headers(): void {
27 header( sprintf( 'Content-Encoding: %s', $this->encoding() ) );
28 }
29 }
30