<?php
/**
 * Session Management Interface
 *
 * This interface defines the contract that all session management classes must implement
 * to provide session storage and retrieval functionality for OTP verification.
 *
 * @package miniorange-sms-order-notification-otp-verification/objects
 */

namespace WCSMSOTP\Objects;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Session Management Interface
 *
 * This interface defines the contract that all session management classes must implement
 * to provide session storage and retrieval functionality for OTP verification.
 */
interface IMoSessions {

	/**
	 * Sets session values.
	 *
	 * @param string $key key value.
	 * @param mixed  $val value of key pair.
	 * @return void
	 */
	public static function add_session_var( $key, $val );
	/**
	 * Return the value stored in session.
	 *
	 * @param string $key key against the value is stored.
	 * @return mixed The session value, or null if not found.
	 */
	public static function get_session_var( $key );
	/**
	 * Unsets the session values as per the type set for.
	 *
	 * @param string $key key to unset.
	 * @return void
	 */
	public static function unset_session( $key );

	/**
	 * Checks if session started or not. Initiates session if not already initialized.
	 *
	 * @return void
	 */
	public static function check_session();
}
