Uname:Linux antigravity-cli 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64

Base Dir : /var/www/moonbloom

User : wp-moonbloom


403WebShell
403Webshell
Server IP : 85.155.190.233  /  Your IP : 216.73.216.103
Web Server : nginx/1.24.0
System : Linux antigravity-cli 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User : wp-moonbloom ( 1001)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/moonbloom/wp-content/plugins/webp-converter-for-media/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/moonbloom/wp-content/plugins/webp-converter-for-media/src/PluginData.php
<?php

namespace WebpConverter;

use WebpConverter\Conversion\Directory\DirectoryFactory;
use WebpConverter\Conversion\Format\FormatFactory;
use WebpConverter\Conversion\Method\MethodFactory;
use WebpConverter\Repository\TokenRepository;
use WebpConverter\Settings\OptionsManager;

/**
 * Manages plugin values.
 */
class PluginData {

	/**
	 * Handler of class with plugin settings.
	 */
	private OptionsManager $settings_object;

	/**
	 * Cached settings of plugin.
	 *
	 * @var mixed[]|null
	 */
	private ?array $plugin_settings = null;

	/**
	 * Cached settings of plugin without sensitive data.
	 *
	 * @var mixed[]|null
	 */
	private ?array $plugin_public_settings = null;

	/**
	 * Cached settings of plugin for debug.
	 *
	 * @var mixed[]|null
	 */
	private ?array $debug_settings = null;

	public function __construct(
		TokenRepository $token_repository,
		MethodFactory $method_factory,
		FormatFactory $format_factory,
		DirectoryFactory $directory_factory
	) {
		$this->settings_object = new OptionsManager( $token_repository, $method_factory, $format_factory, $directory_factory );
	}

	/**
	 * @return mixed[]
	 */
	public function get_plugin_settings(): array {
		return $this->plugin_settings ??= $this->settings_object->get_values();
	}

	/**
	 * Returns settings of plugin without sensitive data.
	 *
	 * @return mixed[]
	 */
	public function get_plugin_settings_public(): array {
		if ( $this->plugin_public_settings === null ) {
			$this->plugin_public_settings = $this->settings_object->get_public_values();
		}
		return $this->plugin_public_settings;
	}

	/**
	 * Returns settings of plugin for debug.
	 *
	 * @return mixed[]
	 */
	public function get_plugin_settings_debug(): array {
		if ( $this->debug_settings === null ) {
			$this->debug_settings = $this->settings_object->get_values( true );
		}
		return $this->debug_settings;
	}

	/**
	 * @param string|null $form_name .
	 *
	 * @return mixed[]
	 */
	public function get_settings_fields( ?string $form_name = null ): array {
		return $this->settings_object->get_fields( $form_name );
	}

	/**
	 * Clears cache for settings of plugin.
	 */
	public function invalidate_plugin_settings(): void {
		$this->plugin_settings        = null;
		$this->plugin_public_settings = null;
		$this->debug_settings         = null;
	}

	/**
	 * Retrieves and validates plugin settings submitted via POST.
	 *
	 * @return mixed[]|null Validated plugin settings values. Returns null if form submission has not been verified.
	 */
	public function get_validated_posted_data(): ?array {
		return $this->settings_object->get_validated_posted_values();
	}

	/**
	 * Validates provided plugin settings data.
	 *
	 * @param mixed[] $form_data Plugin settings data to validate.
	 *
	 * @return mixed[] Validated plugin settings values.
	 */
	public function get_validated_form_data( array $form_data ): array {
		return $this->settings_object->get_validated_form_values( $form_data );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit