HEX
Server: LiteSpeed
System: Linux premium290.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: karemvyp (1881)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/karemvyp/h555.com.pk/wp-content/plugins/jetpack-boost-git/app/modules/Module.php
<?php

namespace Automattic\Jetpack_Boost\Modules;

use Automattic\Jetpack_Boost\Contracts\Optimization;
use Automattic\Jetpack_Boost\Contracts\Pluggable;
use Automattic\Jetpack_Boost\Lib\Status;

class Module {
	/**
	 * @var Status
	 */
	private $status;

	/**
	 * @var Pluggable
	 */
	public $feature;

	public function __construct( Pluggable $feature ) {
		$this->feature = $feature;
		$this->status  = new Status( $feature::get_slug() );
	}

	public function is_enabled() {
		return $this->status->is_enabled();
	}

	/**
	 * Check if the module is active and ready to serve optimized output.
	 */
	public function is_optimizing() {
		if ( $this->feature instanceof Optimization && $this->is_enabled() && $this->feature->is_ready() ) {
			return true;
		}
	}
}