Welcome Guest, Not a member yet? Register   Sign In
CI total newbie topic
#15

[eluser]keevitaja[/eluser]
how to get the called class if the model is allready extended...

Code:
<?php
class Main_model extends Model {
  function __construct() {
    parent::Model();
    
    echo get_class($this);
  }
}

class Final extends Main_model {
  
}

i need to get the name of the last class 'Final' for some db methods like create, update, delete etc. don't want to write them each time.
in order that to work, i have to autoload main_model but this main model is actually abstract and i call methods from Final


Messages In This Thread
CI total newbie topic - by El Forum - 08-26-2010, 08:56 AM
CI total newbie topic - by El Forum - 08-26-2010, 09:38 AM
CI total newbie topic - by El Forum - 08-26-2010, 09:42 AM
CI total newbie topic - by El Forum - 08-26-2010, 02:14 PM
CI total newbie topic - by El Forum - 08-26-2010, 02:55 PM
CI total newbie topic - by El Forum - 08-26-2010, 05:29 PM
CI total newbie topic - by El Forum - 08-26-2010, 06:08 PM
CI total newbie topic - by El Forum - 08-26-2010, 08:50 PM
CI total newbie topic - by El Forum - 08-26-2010, 08:51 PM
CI total newbie topic - by El Forum - 08-27-2010, 02:05 AM
CI total newbie topic - by El Forum - 08-27-2010, 07:28 AM
CI total newbie topic - by El Forum - 08-28-2010, 02:25 AM
CI total newbie topic - by El Forum - 08-28-2010, 02:39 AM
CI total newbie topic - by El Forum - 08-28-2010, 04:59 AM
CI total newbie topic - by El Forum - 08-28-2010, 02:47 PM
CI total newbie topic - by El Forum - 08-28-2010, 02:53 PM
CI total newbie topic - by El Forum - 08-29-2010, 06:02 AM
CI total newbie topic - by El Forum - 08-29-2010, 03:27 PM
CI total newbie topic - by El Forum - 08-30-2010, 02:08 AM
CI total newbie topic - by El Forum - 08-30-2010, 03:00 AM
CI total newbie topic - by El Forum - 08-30-2010, 07:09 AM
CI total newbie topic - by El Forum - 08-31-2010, 02:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB