HEX
Server: Apache
System: Linux webm003.cluster111.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: assotraipi (849654)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/assotraipi/www/wp-content/plugins/download-monitor/src/Download/DownloadFactory.php
<?php

class DLM_Download_Factory {

	/**
	 * @param string $type
	 *
	 * @return DLM_Download | \WPChill\DownloadMonitor\Shop\DownloadProduct\DownloadProduct
	 */
	public function make( $type = 'regular' ) {

		$class_name = 'DLM_Download';

		// check if this is a download product (a download that can be sold), if so create a DownloadProduct instance
		if ( 'product' === $type ) {
			$class_name = '\WPChill\DownloadMonitor\Shop\DownloadProduct\DownloadProduct';
		}

		// make it filterable
		$class_name = apply_filters( 'dlm_download_factory_class_name', $class_name, $type );

		// check if class exists
		if ( ! class_exists( $class_name ) ) {
			$class_name = 'DLM_Download';
		}

		return new $class_name();
	}

}