HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/f/r/e/frenchy/www/_trash/wp-content/plugins/wp-rocket/inc/Addon/Busting/BustingFactory.php
<?php
namespace WP_Rocket\Addon\Busting;

use WP_Rocket\Addon\GoogleTracking\GoogleAnalytics;
use WP_Rocket\Addon\GoogleTracking\GoogleTagManager;
use WP_Rocket\Busting\Facebook_Pickles;
use WP_Rocket\Busting\Facebook_SDK;

/**
 * Busting classes Factory
 *
 * @since 3.6.2
 */
class BustingFactory {
	/**
	 * Base cache busting filepath.
	 *
	 * @var string
	 */
	private $busting_path;

	/**
	 * Base cache busting URL.
	 *
	 * @var string
	 */
	private $busting_url;

	/**
	 * Constructor
	 *
	 * @param string $busting_path Base cache busting filepath.
	 * @param string $busting_url Base cache busting URL.
	 */
	public function __construct( $busting_path, $busting_url ) {
		$this->busting_path = $busting_path;
		$this->busting_url  = $busting_url;
	}

	/**
	 * Creator method
	 *
	 * @param string $type Type of busting class to create.
	 * @return Busting_Interface
	 */
	public function type( $type ) {
		switch ( $type ) {
			case 'fbpix':
				return new Facebook_Pickles( $this->busting_path, $this->busting_url );
			case 'fbsdk':
				return new Facebook_SDK( $this->busting_path, $this->busting_url );
			case 'ga':
				return new GoogleAnalytics( $this->busting_path, $this->busting_url );
			case 'gtm':
				return new GoogleTagManager( $this->busting_path, $this->busting_url, new GoogleAnalytics( $this->busting_path, $this->busting_url ) );
		}
	}
}