<?php
/**
 * app/classes/controller.php
 *
 * This is the main controller class.
 *
 * @version 3.0
 * @author  Joey Kimsey <Joey@thetempusproject.com>
 * @link    https://TheTempusProject.com
 * @license https://opensource.org/licenses/MIT [MIT LICENSE]
 */
namespace TheTempusProject\Classes;

use TheTempusProject\Bedrock\Classes\Controller as BedrockController;
use TheTempusProject\Houdini\Classes\Template;
use TheTempusProject\Bedrock\Classes\Pagination;
use TheTempusProject\TheTempusProject as App;
use TheTempusProject\Models\User;
use TheTempusProject\Models\Sessions;
use TheTempusProject\Bedrock\Functions\Token;
use TheTempusProject\Houdini\Classes\Components;

class Controller extends BedrockController {
    public static $user;
    public static $session;
    public static $pagination;

    public function __construct() {
        parent::__construct();
        self::$session = new Sessions;
        self::$user = new User;
        self::$pagination = Pagination::generate();
        if ( ! empty( App::$activePrefs ) ) {
            self::$pagination::updatePrefs( App::$activePrefs['pageLimit'] );
        }
        new Template;
        Template::setTemplate( 'default' );
    }

    public function __destruct() {
        parent::__destruct();
    }
}
