Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders

ProductDownloadsServiceProvider{}WC 1.0

Service provider for the Product Downloads-related services.

Хуков нет.

Использование

$ProductDownloadsServiceProvider = new ProductDownloadsServiceProvider();
// use class methods

Методы

  1. public register()

Код ProductDownloadsServiceProvider{} WC 6.6.1

class ProductDownloadsServiceProvider extends AbstractServiceProvider {
	/**
	 * The classes/interfaces that are serviced by this service provider.
	 *
	 * @var array
	 */
	protected $provides = array(
		Register::class,
		Sync::class,
		SyncUI::class,
		UI::class,
	);

	/**
	 * Register the classes.
	 */
	public function register() {
		$this->share( Register::class );
		$this->share( Synchronize::class )->addArgument( Register::class );
		$this->share( SyncUI::class )->addArgument( Register::class );
		$this->share( UI::class )->addArgument( Register::class );
	}
}