WP_CLI
WpHttpCacheManager::__construct()
Method of the class: WpHttpCacheManager{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WpHttpCacheManager = new WpHttpCacheManager(); $WpHttpCacheManager->__construct( $cache );
- $cache(FileCache) (required)
- -
WpHttpCacheManager::__construct() WpHttpCacheManager:: construct code WP-CLI 2.8.0-alpha
public function __construct( FileCache $cache ) { $this->cache = $cache; // hook into wp http api add_filter( 'pre_http_request', [ $this, 'filter_pre_http_request' ], 10, 3 ); add_filter( 'http_response', [ $this, 'filter_http_response' ], 10, 3 ); }