rename p2

This commit is contained in:
Joey Kimsey
2025-02-03 12:30:10 -05:00
parent 20f09e6789
commit 98b2f8086c
29 changed files with 0 additions and 0 deletions

56
classes/controller.php Normal file
View File

@ -0,0 +1,56 @@
<?php
/**
* classes/controller.php
*
* The controller handles our main template and provides the
* model and view functions which are the backbone of the tempus
* project. Used to hold and keep track of many of the variables
* that support the applications execution.
*
* @version 1.1.2
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com/libraries/Bedrock
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Bedrock\Classes;
use TheTempusProject\Canary\Bin\Canary as Debug;
use TheTempusProject\Bedrock\Functions\Session;
use TheTempusProject\Houdini\Classes\Issues;
class Controller {
public static $title = null;
public static $pageDescription = null;
public static $template = null;
/**
* Check for issues stored in sessions and add them to current issues.
*/
public static function checkSessions() {
$success = Session::checkFlash( 'success' );
$notice = Session::checkFlash( 'notice' );
$error = Session::checkFlash( 'error' );
$info = Session::checkFlash( 'info' );
if ( !empty( $success ) ) {
Issues::add( 'success', $success );
}
if ( !empty( $notice ) ) {
Issues::add( 'notice', $notice );
}
if ( !empty( $error ) ) {
Issues::add( 'error', $error );
}
if ( !empty( $info ) ) {
Issues::add( 'info', $info );
}
}
public function __construct() {
Debug::log( 'Controller Constructing: ' . get_class( $this ) );
self::checkSessions();
}
public function __destruct() {
Debug::log( 'Controller Destructing: ' . get_class( $this ) );
}
}