<?php
/**
 * Main WPFaqBlock namespace.
 *
 * @since 1.0.0
 * @package wp-block-faqs
 */

namespace WPFaqBlock;
if (!defined('ABSPATH')) {
	exit;

}
/**
 * Main WPBlockFaqs class.
 *
 * @since 1.0.0
 * @package wp-block-faqs
 */
final class WPFaqBlock
{
	/**
	 * One is the loneliest number that you'll ever do.
	 *
	 * @since 1.0.0
	 *
	 * @var \WPFaqBlock\WPFaqBlock
	 */
	private static $instance;
	/**
	 * Plugin version for enqueueing, etc.
	 *
	 * @since 1.0.0
	 *
	 * @var string
	 */
	public $version = '';
	/**
	 * Main WPBlockFaqs Instance.
	 *
	 * Only one instance of WPBlockFaqs exists in memory at any one time.
	 * Also prevent the need to define globals all over the place.
	 *
	 * @since 1.0.0
	 *
	 * @return \WPFaqBlock\WPFaqBlock
	 */
	public static function instance()
	{
		if (null === self::$instance || !self::$instance instanceof self) {
			self::$instance = new self();
			self::$instance->constants();
			self::$instance->includes();
		}
		return self::$instance;
	}
	/**
	 * Setup plugin constants.
	 * All the path/URL related constants are defined in main plugin file.
	 *
	 * @since 1.0.0
	 */
	private function constants()
	{
		$this->version = WPFAQBLOCK_VERSION;
	}

	/**
	 * Include files.
	 *
	 * @since 1.0.0
	 */
	private function includes()
	{
		// Global Includes.
		require_once WPFAQBLOCK_PATH . '/includes/class-wpfaqblock-plugin-settings.php';
	}
}
