| Server IP : 87.229.120.60 / Your IP : 216.73.216.86 Web Server : Apache System : Linux outside 5.4.8_Algonet_ZeroMAC_0.9.4.8 #6 SMP Mon Feb 3 20:36:07 CET 2020 x86_64 User : server ( 1002) PHP Version : 8.3.20 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/faktorteam/www/wp-content/plugins/wp-rocket/inc/Addon/Busting/ |
Upload File : |
<?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 ) );
}
}
}