diff --git a/application/controllers/Login.php b/application/controllers/Login.php index 5c60293..df8d583 100644 --- a/application/controllers/Login.php +++ b/application/controllers/Login.php @@ -13,7 +13,7 @@ use engine\Form; use engine\Input; -class Login extends Controller +class login extends Controller { /** * Defining $_service Service type. diff --git a/application/controllers/dashboard.php b/application/controllers/dashboard.php index c167e90..693cd0e 100644 --- a/application/controllers/dashboard.php +++ b/application/controllers/dashboard.php @@ -46,8 +46,8 @@ public function __construct() */ public function index() { - $this->_view->addLibrary('js', 'application/views/dashboard/js/dashboard.js'); - $this->_view->addLibrary('css', 'application/views/dashboard/css/dashboard.css'); + $this->_view->addLibrary('application/views/dashboard/js/dashboard.js'); + $this->_view->addLibrary('application/views/dashboard/css/dashboard.css'); $this->_view->setParameter('userName', Session::get('userName')); diff --git a/application/controllers/error.php b/application/controllers/error.php index d4b87af..7158660 100644 --- a/application/controllers/error.php +++ b/application/controllers/error.php @@ -36,7 +36,7 @@ public function __construct() $this->_view->setTitle('Error'); - $this->_view->addLibrary('css', 'application/views/error/css/error.css'); + $this->_view->addLibrary('application/views/error/css/error.css'); } /** General Error Page */ diff --git a/application/controllers/help.php b/application/controllers/help.php index cbba099..5c4b42a 100644 --- a/application/controllers/help.php +++ b/application/controllers/help.php @@ -26,7 +26,7 @@ public function __construct() { parent::__construct(new HelpService); - $this->_view->addLibrary('css', 'views/help/css/help.css'); + $this->_view->addLibrary('application/views/help/css/help.css'); } /** diff --git a/application/controllers/releaseLog.php b/application/controllers/releaseLog.php index 936c9e1..0ebced3 100644 --- a/application/controllers/releaseLog.php +++ b/application/controllers/releaseLog.php @@ -31,12 +31,15 @@ public function __construct() parent::__construct(); // Setting version under construction - $this->_setDevelopmentVersion('2.24', '06/01/2014', array( - '[Refactor] - Mayor change. After intense struggles and researches, decided to use PHP ActiveRecord. Because of this, deleted all Database and Model related constructions used so far. I am aiming to implement my own PHP ActiveRecord technology for the third Hecnel Framework version.', - '[Feature] - Test 4 is designed to be the testing workspace for multiple model work. However, as PHP ActiveRecord comes to play, it is halfway implemented. To be reworked in future.', + $this->_setDevelopmentVersion('2.241', '07/01/2014', array( + '[Etc] - Minor changes - last touches here and there.' )); // Setting Historical Log of releases + $this->_addHistoryLog('2.24', '06/01/2014', array( + '[Refactor] - Mayor change. After intense struggles and researches, decided to use PHP ActiveRecord. Because of this, deleted all Database and Model related constructions used so far. I am aiming to implement my own PHP ActiveRecord technology for the third Hecnel Framework version.', + '[Feature] - Test 4 is designed to be the testing workspace for multiple model work. However, as PHP ActiveRecord comes to play, it is halfway implemented. To be reworked in future.', + )); $this->_addHistoryLog('2.23', '04/01/2014', array( '[Refactor] - Modified libraries concept to Service concepts. A Service is tightly related to a controller. It stores intelligence regarding what to do with validated information, which models request a CRUD, and informs the controller about the message to put into the related view.', '[Refactor] - Modified Hecnel Framework in order to use the new Model architecture.' diff --git a/application/controllers/test1.php b/application/controllers/test1.php index 071a8b5..a8076c1 100644 --- a/application/controllers/test1.php +++ b/application/controllers/test1.php @@ -27,7 +27,7 @@ public function __construct() public function index() { - $this->_view->addLibrary('css', 'application/views/tests/test1/css/test1.css'); + $this->_view->addLibrary('application/views/tests/test1/css/test1.css'); // Main view $this->_view->addChunk('tests/test1/index'); diff --git a/application/controllers/test3.php b/application/controllers/test3.php index 785fdf1..ddc039a 100644 --- a/application/controllers/test3.php +++ b/application/controllers/test3.php @@ -27,8 +27,8 @@ public function __construct() public function index() { - $this->_view->addLibrary('js', 'application/views/tests/test3/js/test3.js'); - $this->_view->addLibrary('css', 'application/views/tests/test3/css/test3.css'); + $this->_view->addLibrary('application/views/tests/test3/js/test3.js'); + $this->_view->addLibrary('application/views/tests/test3/css/test3.css'); $this->_view->addChunk('tests/test3/index'); } diff --git a/application/controllers/test4.php b/application/controllers/test4.php index fbf76ec..50712b5 100644 --- a/application/controllers/test4.php +++ b/application/controllers/test4.php @@ -28,8 +28,8 @@ public function __construct() public function index() { - $this->_view->addLibrary('js', 'application/views/tests/test4/js/test4.js'); - $this->_view->addLibrary('css', 'application/views/tests/test4/css/test4.css'); + $this->_view->addLibrary('application/views/tests/test4/js/test4.js'); + $this->_view->addLibrary('application/views/tests/test4/css/test4.css'); $this->_view->addChunk('tests/test4/index'); } diff --git a/application/engine/Controller.php b/application/engine/Controller.php index 6454710..79072d6 100644 --- a/application/engine/Controller.php +++ b/application/engine/Controller.php @@ -33,10 +33,10 @@ protected function _setView() parent::_setView(); $this->_view->setTitle('Hecnel Framework'); - $this->_view->addLibrary('css', 'public/css/default.css'); + $this->_view->addLibrary('public/css/default.css'); - $this->_view->addLibrary('js', 'public/js/external/jquery-1.10.1.js'); - $this->_view->addLibrary('js', 'public/js/general.js'); + $this->_view->addLibrary('public/js/external/jquery-1.10.1.js'); + $this->_view->addLibrary('public/js/general.js'); $this->_view->setMeta('description', array( 'name' => 'description', @@ -58,8 +58,8 @@ protected function _setView() 'content' => 'Hecnel Framework, PHP, JavaScript, OOP, MVC' )); - $this->_view->addLibrary('css', 'application/views/general/css/base.css'); - $this->_view->addLibrary('js', 'application/views/general/js/base.js'); + $this->_view->addLibrary('application/views/general/css/base.css'); + $this->_view->addLibrary('application/views/general/js/base.js'); $this->_view->addChunk('general/top', 'header'); $this->_view->addChunk('general/bottom', 'footer'); diff --git a/application/views/help/index.php b/application/views/help/index.php index 7b25b87..0c5b113 100644 --- a/application/views/help/index.php +++ b/application/views/help/index.php @@ -4,6 +4,7 @@ * User: Hector Ordonez * Description: * Date: 26/12/13 21:30 + * @var \application\engine\View $this */ ?> @@ -15,7 +16,7 @@ Help me with Eating Cakes Without Getting Fat (ECWGF) Help me with Drinking Whisky Without Getting Drunk (DWWGD)
- msg; ?> + getParameter('msg'); ?> printChunk('footer'); ?> diff --git a/engine/Input.php b/engine/Input.php index 8ac6fdc..1de0b2d 100644 --- a/engine/Input.php +++ b/engine/Input.php @@ -3,7 +3,7 @@ * Project: Hecnel Framework * User: Hector Ordonez * Description: - * @date: 16/06/13 22:00 + * @date: 13/12/13 15:30 */ namespace engine; diff --git a/engine/View.php b/engine/View.php index fe0933d..c480a45 100644 --- a/engine/View.php +++ b/engine/View.php @@ -6,7 +6,6 @@ * View engine class. * Its purpose is to define the behavior of the Views of the application and to provide general methods. * @date: 11/06/13 12:00 - * @todo Redesign View concept. */ namespace engine; @@ -80,25 +79,20 @@ public function __construct() /** * Adds a CSS or JS library to the appropriate array in the View. - * The handling of these arrays is normally done in the Header. In case the general Header is not called, another - * view has to render them. - * * Notice that if the first four characters are http, the library is considered external and the BASE_URL of the system won't be added to the String. * - * @param string $type * @param string $libraryPath - * @todo This method can find out itself whether the added library is js or css, just looking by its extension. */ - public function addLibrary($type, $libraryPath) + public function addLibrary($libraryPath) { if (substr($libraryPath, 0, 4) !== "http") { $libraryPath = _SYSTEM_BASE_URL . $libraryPath; } - - if ($type == 'css') { - $this->_css[] = $libraryPath; - } elseif ($type == 'js') { + + if(substr($libraryPath, -2, 2) == 'js'){ $this->_js[] = $libraryPath; + } else { + $this->_css[] = $libraryPath; } } diff --git a/index.php b/index.php index e96a09c..ecd252a 100644 --- a/index.php +++ b/index.php @@ -12,6 +12,7 @@ * @todo Currency - Which currency User requires. * @todo Hecnel 3.0 - Validation system similar to old one, in combination with a minor Model modification to allow field type definition when constructing. * @todo This would allow Models to validate data using the validation system. + * @todo Hecnel 3.0 - Build a customized ActiveRecord system and remove the php-activerecord. This system should make use of the validation system. */ // First thing ever, session_start.