HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/class-wc-rest-wccom-site-installer-error.php.tar
plugins/woocommerce/includes/wccom-site/rest-api/class-wc-rest-wccom-site-installer-error.php000064400000002217151554253330040740 0ustar00var/www/vhosts/uyarreklam.com.tr/httpdocs/wp-content<?php
/**
 * WCCOM Site Installer Error Class
 *
 * @package WooCommerce\WCCom\API
 * @since   7.7.0
 */

defined( 'ABSPATH' ) || exit;

/**
 * WCCOM Site Installer Error Class
 */
class WC_REST_WCCOM_Site_Installer_Error extends Exception {

	/**
	 * Constructor for the Installer Error class.
	 *
	 * @param string $error_code Error code.
	 * @param string $error_message Error message.
	 * @param int    $http_code HTTP status code.
	 */
	public function __construct( $error_code, $error_message = null, $http_code = null ) {
		$this->error_code    = $error_code;
		$this->error_message = $error_message ?? WC_REST_WCCOM_Site_Installer_Error_Codes::ERROR_MESSAGES[ $error_code ] ?? '';
		$this->http_code     = $http_code ?? WC_REST_WCCOM_Site_Installer_Error_Codes::HTTP_CODES[ $error_code ] ?? 400;

		parent::__construct( $error_code );
	}

	/**
	 * Get the error code.
	 */
	public function get_error_code() {
		return $this->error_code;
	}

	/**
	 * Get the error message.
	 */
	public function get_error_message() {
		return $this->error_message;
	}

	/**
	 * Get the HTTP status code.
	 */
	public function get_http_code() {
		return $this->http_code;
	}
}