i'm new codeigniter , i'd load model in core/my_lang.php class.
class my_lang extends ci_lang { /** array $languages array of languages */ var $languages = array(''); /** array $special special uris (not localized) **/ var $special = array(''); /** string $default_uri redirect if no language in uri */ var $default_uri = ''; public function getlanguages() { $this->load->model('lang_model'); return $this->lang_model->getlangs(); }
of course example of i'm trying achieve. doesn't work , questions are:
- is practise this?
- if yes, how can load model in class?
i didn't load of core classes of ci .
the used class , load theme in autoload.php file instead of load them every time .
Comments
Post a Comment