UPDATE: Minor bugfixes for the current functionallity. Now having a running out of the box system.

This commit is contained in:
Stephan Kasdorf
2017-07-31 21:44:52 +02:00
parent afcde5ca49
commit 28fe5936cf
7 changed files with 26 additions and 10 deletions

View File

@@ -2,10 +2,10 @@
;;name = "Dwoo" ;;name = "Dwoo"
name = "Smarty" name = "Smarty"
;;name = "Twig" ;;name = "Twig"
cache = "application/view/cache/" cache = "/../../application/view/cache/"
templates = "application/view/templates/" templates = "/../../application/view/templates/"
templates_c = "application/view/templates_c/" templates_c = "/../../application/view/templates_c/"
config_dir = "application/view/configs/" config_dir = "/../../application/view/configs/"
class_file = "core/l/Smarty/Smarty.class.php" class_file = "core/l/Smarty/Smarty.class.php"
debugbar = false debugbar = false

View File

@@ -38,7 +38,7 @@ class Config extends Settings
*/ */
private static function setEnv( ) private static function setEnv( )
{ {
if(getenv("APPLICATION_ENV")) if( getenv("APPLICATION_ENV") )
{ {
self::$_env = getenv("APPLICATION_ENV"); self::$_env = getenv("APPLICATION_ENV");
} }

View File

@@ -18,6 +18,7 @@ class Controller
protected $_post = array(); protected $_post = array();
private $_current = array(); private $_current = array();
private $_next = array(); private $_next = array();
private $_controller = "index";
protected function __construct() protected function __construct()
{ {
@@ -50,6 +51,22 @@ class Controller
$this->_config = $config; $this->_config = $config;
} }
/**
* @return string
*/
public function getController()
{
return $this->_controller;
}
/**
* @param string $controller
*/
protected function setController( $controller )
{
$this->_controller = $controller;
}
/** /**
* @param $template * @param $template
* @param $page * @param $page

View File

@@ -30,7 +30,7 @@ final class Dispatcher
Router::getInstance(); Router::getInstance();
Router::getInstance()->route(); Router::getInstance()->route();
require_once __DIR__ . '/../../application/controller/' . Router::getInstance()->tplName() . 'Controller.php'; require_once __DIR__ . '/../../application/controller/' . Router::getInstance()->tplName() . 'Controller.php';
$class = "Sunrise\\".\Sunrise\Router::getInstance()->tplName()."Controller"; $class = "Nibiru\\".\Nibiru\Router::getInstance()->tplName()."Controller";
$controller = new $class(); $controller = new $class();
if(array_key_exists('_action', $_REQUEST)) if(array_key_exists('_action', $_REQUEST))

View File

@@ -10,8 +10,6 @@
session_start(); session_start();
/** /**
* @desc Nibiru framework functionality * @desc Nibiru framework functionality
* TODO: write a javascript controller handler
* in order to be full scale compatible with limbas
*/ */
require_once __DIR__ . '/t/messages.php'; require_once __DIR__ . '/t/messages.php';
require_once __DIR__ . '/c/settings.php'; require_once __DIR__ . '/c/settings.php';

View File

@@ -10,7 +10,8 @@ namespace Nibiru;
*/ */
interface IController interface IController
{ {
const START_CONTROLLER_NAME = "index";
/** /**
* This should be part of any extended controller * This should be part of any extended controller
* class in order to implement a page structure * class in order to implement a page structure

View File

@@ -9025,7 +9025,7 @@ $.extend( Datepicker.prototype, {
if ( secondary || !changeYear ) { if ( secondary || !changeYear ) {
html += "<span class='ui-datepicker-year'>" + drawYear + "</span>"; html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
} else { } else {
// determine range of years to display // determine range of years to display
years = this._get( inst, "yearRange" ).split( ":" ); years = this._get( inst, "yearRange" ).split( ":" );
thisYear = new Date().getFullYear(); thisYear = new Date().getFullYear();