Welcome Guest, Not a member yet? Register   Sign In
News tutorial help needed
#13

[eluser]Tim Brownlaw[/eluser]
Looking at CI 2.1.4...

If you look at the code for the CI_Model which lives under system/core/Model.php you will see in the following snippet...
Code:
class CI_Model {

/**
  * Constructor
  *
  * @access public
  */
function __construct()
{
  log_message('debug', "Model Class Initialized");
}

So calling the CI_Model constructor will simply log a message stating it's been initialized IF you are logging at the Debug level. Which is enabled if you set $config['log_threshold'] to be 2 or above in the config/config.php file.

Technically if a parent class has a constructor and it does "something", it should be called. But in this particular case it's not a show stopper.

So in this instance, I'd call it an omission, that may have occurred to keep things simple. But for completeness and consistency it should be included.



Messages In This Thread
News tutorial help needed - by El Forum - 10-10-2012, 10:19 AM
News tutorial help needed - by El Forum - 10-10-2012, 10:54 AM
News tutorial help needed - by El Forum - 10-10-2012, 11:00 AM
News tutorial help needed - by El Forum - 10-10-2012, 11:11 AM
News tutorial help needed - by El Forum - 10-10-2012, 11:19 AM
News tutorial help needed - by El Forum - 10-10-2012, 11:26 AM
News tutorial help needed - by El Forum - 10-10-2012, 01:37 PM
News tutorial help needed - by El Forum - 10-11-2012, 08:40 AM
News tutorial help needed - by El Forum - 10-11-2012, 08:52 PM
News tutorial help needed - by El Forum - 10-16-2012, 06:40 AM
News tutorial help needed - by El Forum - 02-12-2013, 07:17 AM
News tutorial help needed - by El Forum - 08-06-2014, 06:15 AM
News tutorial help needed - by El Forum - 08-06-2014, 01:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB