<?php

namespace Planaday\Platform\PlatformAbstraction;

interface DataHandler {
	public function setOption( string $optionName, $value ): void;

	/**
	 * @param string $optionName
	 *
	 * @return false|mixed|mixed[]|null
	 */
	public function getOption( string $optionName ): mixed;

	/**
	 * @param string $fieldName
	 *
	 * @return mixed
	 */
	public function getPostField( string $fieldName ): mixed;
	public function getPostData(): array;
	public function isPostDataSet(): bool;
	public function escapeSql(array|string $input);
	public function sanitizeTextareaField(string $input): string;
	public function getServer():string;
	public function getSupportObject(): array;
	public function getSupportString(): string;
	public function generateNonceKey(string $nonceName, bool $clean = false): string;
	public function verifyNonce(string $nonceName, ?string $key = null): bool;
	public function verifyAdminNonce(string $nonceName): void;
	public function getRestNonceHeader(): array;
	public function getPlatformVersion(): string;
	public function saveBackofficeKey(string $key): void;
	public function checkBackofficeKey(string $key): bool;
}