Faryshta
|
I noticed that the bootstraps code on github includes the php code for the benchmarks, the page layout, title and menus.
On my opinion that should go on the index because you won't always use the same page layout, title, bencharks, etc.
To delete the benchmarks you need to edit the php source code of the view class which is very dangerous.
In my opinion the index.php file should be the one handling that. Something like this.
<?php
$app = "app";
require_once "config/directory.php";
require_once "$app/bootstrap.php";
#--------------------------------
# Auto Load the Controller
# init_route set the controller/action/params
# to load the controller
#--------------------------------
$loader->auto_load_controller();
#--------------------------------
# Load model
# load the model and assign the result
# @params model, action, params, assign_to
#--------------------------------
$loader->load_menu();
$loader->init_page_layout('index');
#--------------------------------
# Assign Layout variables
#--------------------------------
$loader->assign( 'title', 'RainFramework' );
// - BENCHMARK ------
$loader->assign( "execution_time", timer() );
$loader->assign( "memory_used", memory_usage() );
$loader->assign( "n_query", class_exists('db') ? db::get_executed_query() : null );
// --------------
#--------------------------------
# Print the layout
#--------------------------------
$loader->draw(); |