Short object name for a model on autoload file |
[eluser]Arun Joshi[/eluser]
Hello We can add a short object name for a model when we load it, like Code: $this->load->model('Usermanagemet_model', 'mod_user'); This is ok when we load models from controllers. Then can we add a short object name when we load it in autoload file? Thanks Arun
[eluser]Georgi Budinov[/eluser]
Never needed that but a fast check in the sources - seems that there is no way to do that in 1.7 at least. You could extend the CI_Loader class and overwrite _ci_autoloader function.
[eluser]cahva[/eluser]
..or use base controller technique described here: http://philsturgeon.co.uk/news/2010/02/C...ing-it-DRY I always use this method and I don't autoload anything but the obvious(url helper, session, database etc.).
[eluser]sa3m[/eluser]
Hi, sorry to dig up this thread I posted a suggestion about this on uservoice : http://codeigniter.uservoice.com/forums/...?ref=title Do you think that it could solve your problem ? |
Welcome Guest, Not a member yet? Register Sign In |