Since the CSO Finance Dashboard is built on-top of CodeIgniter 3, the PHP scripting language will be utilized.
As a result, standard PHP practices and conventions will be followed.
Considering CodeIgniter follows the MVC framework, the following functions naming conventions is followed for both contollers and models:
For functions that loads html pages, all function names must be in lowercase and the spaces is delimited by an underscore.
An example can be seen below.
public function activity_page($orgInitials,$pageID) {
// Redirect to login if session does not exists.
$this->checkSession();
// Load ActitivityModel.php
$this->load->model('CSOmodel');
...
$this->load->view('cso_activity_page', $activity);
}
For functions that performs CRUD (Create, Retrieve, Update, and Delete functions), function names should follow Camel Case naming convention. An example can be seen below.
public function checkSession(){
if($this->session->has_userdata('email')){
return;
}
redirect(site_url('login'));
}
If a function both performs CURD and loading of html, the loading of view naming convention is followed.