Welcome Guest, Not a member yet? Register   Sign In
Is this good way of doing things?
#1

[eluser]veledrom[/eluser]
Hi,

In my main class, I have constructor set like this:
Code:
public function __construct()
    {
        parent::__construct();
        
        $this->load->helper('url');
        $this->load->helper('form');
        $this->load->library('form_validation');
        $this->load->library('xmlrpc');
        $this->load->library('database');
        $this->load->library('session');
        $this->load->model('xml_model');        
        $this->load->model('image_model');
        $this->load->library('blah');
        $this->load->library('blah');
        $this->load->library('blah');
    }

1. Do you think this is good practise?
2. Would it slow my website down?
3. Would it speed my website up if I enable some in autoload.php instead?

Thanks in advance
#2

[eluser]InsiteFX[/eluser]
You can autoload libraries most users autoload the database and session libraries because they are used so much and maybe the Form_Validation library.
Other wise only load them when you need them.

InsiteFX
#3

[eluser]veledrom[/eluser]
Thanks




Theme © iAndrew 2016 - Forum software by © MyBB