UPDATE: Minor bugfixes for the current functionallity. Now having a running out of the box system.
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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))
|
||||||
|
|||||||
@@ -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';
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ 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
|
||||||
|
|||||||
Reference in New Issue
Block a user