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 ) ); } } }