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-yith-wcwl-exception.php.tar
httpdocs/wp-content/plugins/yith-woocommerce-wishlist/includes/class-yith-wcwl-exception.php000064400000001437151542125300035121 0ustar00var/www/vhosts/uyarreklam.com.tr<?php
/**
 * Wishlist Exception class
 *
 * @package YITH\Wishlist\Classes
 * @author  YITH <plugins@yithemes.com>
 * @version 3.0.0
 */

defined( 'YITH_WCWL' ) || exit; // Exit if accessed directly.

if ( ! class_exists( 'YITH_WCWL_Exception' ) ) {
	/**
	 * WooCommerce Wishlist Exception
	 *
	 * @since 1.0.0
	 */
	class YITH_WCWL_Exception extends Exception {
		/**
		 * Available error codes
		 *
		 * @var array
		 */
		private $error_codes = array(
			0 => 'error',
			1 => 'exists',
		);

		/**
		 * Returns textual code for the error
		 *
		 * @return string Textual code of the error.
		 */
		public function getTextualCode() {
			$code = $this->getCode();

			if ( array_key_exists( $code, $this->error_codes ) ) {
				return $this->error_codes[ $code ];
			}

			return 'error';
		}
	}
}