Removed unnecessary constructor methods from model classes.

This commit is contained in:
Alex Tselegidis 2016-07-17 13:07:59 +02:00
parent 6cda484e1d
commit 0caff545a9
9 changed files with 31 additions and 90 deletions

View file

@ -33,13 +33,6 @@
* @package Models * @package Models
*/ */
class Admins_Model extends CI_Model { class Admins_Model extends CI_Model {
/**
* Class Constructor
*/
public function __construct() {
parent::__construct();
}
/** /**
* Add (insert or update) an admin user record into database. * Add (insert or update) an admin user record into database.
* *

View file

@ -17,13 +17,6 @@
* @package Models * @package Models
*/ */
class Appointments_Model extends CI_Model { class Appointments_Model extends CI_Model {
/**
* Class Constructor
*/
public function __construct() {
parent::__construct();
}
/** /**
* Add an appointment record to the database. * Add an appointment record to the database.
* *

View file

@ -17,13 +17,6 @@
* @package Models * @package Models
*/ */
class Customers_Model extends CI_Model { class Customers_Model extends CI_Model {
/**
* Class Constructor
*/
public function __construct() {
parent::__construct();
}
/** /**
* Add a customer record to the database. * Add a customer record to the database.
* *

View file

@ -45,13 +45,6 @@
* @package Models * @package Models
*/ */
class Providers_Model extends CI_Model { class Providers_Model extends CI_Model {
/**
* Class Constructor
*/
public function __construct() {
parent::__construct();
}
/** /**
* Add (insert - update) a service provider record. * Add (insert - update) a service provider record.
* *

View file

@ -17,13 +17,6 @@
* @package Models * @package Models
*/ */
class Roles_Model extends CI_Model { class Roles_Model extends CI_Model {
/**
* Class Constructor
*/
public function __construct() {
parent::__construct();
}
/** /**
* Get the record id of a particular role. * Get the record id of a particular role.
* *

View file

@ -34,13 +34,6 @@
* @package Models * @package Models
*/ */
class Secretaries_Model extends CI_Model { class Secretaries_Model extends CI_Model {
/**
* Class Constructor
*/
public function __construct() {
parent::__construct();
}
/** /**
* Add (insert or update) a secretary user record into database. * Add (insert or update) a secretary user record into database.
* *

View file

@ -17,13 +17,6 @@
* @package Models * @package Models
*/ */
class Services_Model extends CI_Model { class Services_Model extends CI_Model {
/**
* Class Constructor
*/
function __construct() {
parent::__construct();
}
/** /**
* Add (insert or update) a service record on the database * Add (insert or update) a service record on the database
* *

View file

@ -17,13 +17,6 @@
* @package Models * @package Models
*/ */
class Settings_Model extends CI_Model { class Settings_Model extends CI_Model {
/**
* Class Constructor
*/
function __construct() {
parent::__construct();
}
/** /**
* Get setting value from database. * Get setting value from database.
* *

View file

@ -20,18 +20,13 @@
*/ */
class User_Model extends CI_Model { class User_Model extends CI_Model {
/** /**
* Class Constructor * Returns the user from the database for the "settings" page.
*/
public function __construct() {
parent::__construct();
}
/**
* Returns the user settings from the database.
* *
* @param numeric $user_id User record id of which the settings will be returned. * @param numeric $user_id User record id.
* *
* @return array Returns an array with user settings. * @return array Returns an array with user data.
*
* @todo Refactor this method as it does not do as it states.
*/ */
public function get_settings($user_id) { public function get_settings($user_id) {
$user = $this->db->get_where('ea_users', array('id' => $user_id))->row_array(); $user = $this->db->get_where('ea_users', array('id' => $user_id))->row_array();
@ -41,11 +36,13 @@ class User_Model extends CI_Model {
} }
/** /**
* This method saves the user settings into the database. * This method saves the user record into the database (used in backend settings page).
* *
* @param array $user Contains the current users settings. * @param array $user Contains the current users data.
* *
* @return bool Returns the operation result. * @return bool Returns the operation result.
*
* @todo Refactor this method as it does not do as it states.
*/ */
public function save_settings($user) { public function save_settings($user) {
$user_settings = $user['settings']; $user_settings = $user['settings'];