✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.95
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/tdhomesa/public_html/wp-content/plugins/woocommerce/packages/blueprint/src//ImportSchema.php
<?php

namespace Automattic\WooCommerce\Blueprint;

use Automattic\WooCommerce\Blueprint\Schemas\JsonSchema;
use Opis\JsonSchema\Errors\ErrorFormatter;
use Opis\JsonSchema\Validator;

/**
 * Class ImportSchema
 *
 * Handles the import schema functionality for WooCommerce.
 *
 * @package Automattic\WooCommerce\Blueprint
 */
class ImportSchema {
	use UseWPFunctions;

	/**
	 * JsonSchema object.
	 *
	 * @var JsonSchema The schema instance.
	 */
	private JsonSchema $schema;

	/**
	 * Validator object.
	 *
	 * @var Validator The JSON schema validator instance.
	 */
	private Validator $validator;


	/**
	 * ImportSchema constructor.
	 *
	 * @param JsonSchema     $schema The schema instance.
	 * @param Validator|null $validator The validator instance, optional.
	 */
	public function __construct( JsonSchema $schema, ?Validator $validator = null ) {
		$this->schema = $schema;
		if ( null === $validator ) {
			$validator = new Validator();
		}

		$this->validator = $validator;
	}

	/**
	 * Get the schema.
	 *
	 * @return JsonSchema The schema.
	 */
	public function get_schema() {
		return $this->schema;
	}

	/**
	 * Create an ImportSchema instance from a file.
	 *
	 * @param string $file The file path.
	 * @return ImportSchema The created ImportSchema instance.
	 *
	 * @throws \RuntimeException If the JSON file cannot be read.
	 * @throws \InvalidArgumentException If the JSON is invalid or missing 'steps' field.
	 */
	public static function create_from_file( $file ) {
		return self::create_from_json( $file );
	}

	/**
	 * Create an ImportSchema instance from a JSON file.
	 *
	 * @param string $json_path The JSON file path.
	 * @return ImportSchema The created ImportSchema instance.
	 *
	 * @throws \RuntimeException If the JSON file cannot be read.
	 * @throws \InvalidArgumentException If the JSON is invalid or missing 'steps' field.
	 */
	public static function create_from_json( $json_path ) {
		return new self( new JsonSchema( $json_path ) );
	}

	/**
	 * Import the schema steps.
	 *
	 * @return StepProcessorResult[]
	 */
	public function import() {
		$results   = array();
		$result    = StepProcessorResult::success( 'ImportSchema' );
		$results[] = $result;

		foreach ( $this->schema->get_steps() as $step_schema ) {
			$step_importer = new ImportStep( $step_schema, $this->validator );
			$results[]     = $step_importer->import();
		}

		return $results;
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Cli
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Exporters
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Importers
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
ResourceStorages
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
ResultFormatters
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Schemas
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Steps
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
docs
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
BuiltInExporters.php
0.463 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
BuiltInStepProcessors.php
1.809 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
ClassExtractor.php
6.055 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
Cli.php
1.78 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
ExportSchema.php
4.301 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
ImportSchema.php
2.337 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
ImportStep.php
4.465 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
Logger.php
4.066 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
ResourceStorages.php
1.452 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
StepProcessor.php
0.664 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
StepProcessorResult.php
3.563 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
UsePluginHelpers.php
3.127 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
UsePubSub.php
1.509 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
UseWPFunctions.php
9.717 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
Util.php
4.386 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF