Automattic\WooCommerce\Blueprint

BuiltInStepProcessors{}WC 1.0

Class BuiltInStepProcessors

Хуков нет.

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

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

Методы

  1. public __construct()
  2. public get_all()
  3. private create_install_plugins_processor()
  4. private create_install_themes_processor()

Заметки

  • Пакет: Automattic\WooCommerce\Blueprint

Код BuiltInStepProcessors{} WC 9.9.5

class BuiltInStepProcessors {
	/**
	 * BuiltInStepProcessors constructor.
	 */
	public function __construct() {
	}

	/**
	 * Returns an array of all step processors.
	 *
	 * @return array The array of step processors.
	 */
	public function get_all() {
		return array(
			$this->create_install_plugins_processor(),
			$this->create_install_themes_processor(),
			new ImportSetSiteOptions(),
			new ImportActivatePlugin(),
			new ImportActivateTheme(),
			new ImportRunSql(),
		);
	}

	/**
	 * Creates the processor for installing plugins.
	 *
	 * @return ImportInstallPlugin The processor for installing plugins.
	 */
	private function create_install_plugins_processor() {
		$storages = new ResourceStorages();
		$storages->add_storage( new OrgPluginResourceStorage() );
		return new ImportInstallPlugin( $storages );
	}

	/**
	 * Creates the processor for installing themes.
	 *
	 * @return ImportInstallTheme The processor for installing themes.
	 */
	private function create_install_themes_processor() {
		$storage = new ResourceStorages();
		$storage->add_storage( new OrgThemeResourceStorage() );
		return new ImportInstallTheme( $storage );
	}
}