<?php
/**
 *
 * Load the API components.
 *
 * @since 1.0.0
 *
 * @package SplendorStudio\Framework\API
*/
abstract class Fancify_Lite_Controller {

	use Template_Trait;

	private static $instances = array();
	protected $theme_slug = false;
	protected $model;

	/**
	 * Provides access to a single instance of a module using the singleton pattern
	 *
	 * @since    1.0.0
	 */
	public static function get_instance() {
		$classname = get_called_class();

		if ( ! isset( self::$instances[ $classname ] ) ) {
			self::$instances[ $classname ] = new $classname();
		}
		return self::$instances[ $classname ];
	}

	/**
	 * Get model
	 *
	 * @since    1.0.0
	 */
	protected static function get_model() {
		return static::get_instance()->model;
	}

	/**
	 * Constructor
	 *
	 */
	abstract protected function __construct();

	/**
	 * Register callbacks for actions and filters
	 * 
	 */
	abstract protected function register_hook_callbacks();

}
