HEX
Server: LiteSpeed
System: Linux s383.bitcommand.com 5.14.0-687.24.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 9 18:14:06 EDT 2026 x86_64
User: pclast (1605)
PHP: 8.1.34
Disabled: exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/pclast/www/wp-content/plugins/wp-rocket/inc/Engine/Preload/Activation/ServiceProvider.php
<?php
declare(strict_types=1);

namespace WP_Rocket\Engine\Preload\Activation;

use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
use WP_Rocket\Engine\Preload\Controller\{PreloadUrl, Queue};
use WP_Rocket\Engine\Preload\Database\Queries\Cache as CacheQuery;
use WP_Rocket\Engine\Preload\Database\Tables\Cache as CacheTable;

class ServiceProvider extends AbstractServiceProvider {
	/**
	 * Array of services provided by this service provider
	 *
	 * @var array
	 */
	protected $provides = [
		'preload_cache_table',
		'preload_caches_query',
		'preload_url_controller',
		'preload_queue',
		'preload_activation',
	];

	/**
	 * Check if the service provider provides a specific service.
	 *
	 * @param string $id The id of the service.
	 *
	 * @return bool
	 */
	public function provides( string $id ): bool {
		return in_array( $id, $this->provides, true );
	}

	/**
	 * Registers the subscribers in the container
	 *
	 * @since 3.3
	 *
	 * @return void
	 */
	public function register(): void {
		$this->getContainer()->add( 'preload_cache_table', CacheTable::class );
		$this->getContainer()->get( 'preload_cache_table' );
		$this->getContainer()->add( 'preload_cache_query', CacheQuery::class )
			->addArgument( 'logger' );
		$this->getContainer()->add( 'preload_queue', Queue::class );
		$this->getContainer()->add( 'preload_url_controller', PreloadUrl::class )
			->addArguments(
				[
					'options',
					'preload_queue',
					'preload_cache_query',
					rocket_direct_filesystem(),
				]
			);
		$this->getContainer()->add( 'preload_activation', Activation::class )
			->addArguments(
				[
					'preload_url_controller',
					'preload_queue',
					'preload_cache_query',
					'options',
				]
			);
	}
}