private function smarty() { if (self::$_view === null) { $smarty = new \Smarty(); $smarty->setTemplateDir(ROOT_PATH . "application" . DIRECTORY_SEPARATOR . "mvc" . DIRECTORY_SEPARATOR . "view"); self::$_view = $smarty; } return self::$_view; }
<?php session_start(); spl_autoload_register(function ($class) { require_once __DIR__ . '/' . $class . '.php'; }); use framework\FrameworkController; use lib\GlobalHelper; $responseForUser = FrameworkController::requestFromUser(); if (!GlobalHelper::isRequestAjax()) { ?> <meta charset="UTF-8"> <SCRIPT LANGUAGE='Javascript' SRC='<?php echo \Config::getBaseURL(); ?> frontend/js/jquery-2.1.1.min.js'></SCRIPT> <link rel="stylesheet" href="<?php echo \Config::getBaseURL(); ?> frontend/lib/bootstrap-3.2.0-dist/css/bootstrap.css"> <script src="<?php echo \Config::getBaseURL(); ?> frontend/lib/bootstrap-3.2.0-dist/js/bootstrap.min.js"></script> <link rel='stylesheet' href='<?php echo \Config::getBaseURL(); ?> frontend/css/main.css' type='text/css' /> <SCRIPT LANGUAGE='Javascript' SRC='<?php echo \Config::getBaseURL();