title: using external library classes in codeigniter
body: <p>i have crated a custom library file for the login validation. if i call the custom library at before $this->load->library('form_validation');</p>
  
  <pre><code>class VerifyLogin extends CI_Controller {
       function __construct()
       {
         parent::__construct();
         $this-&gt;load-&gt;helper('url'); 
         $this-&gt;load-&gt;model('loginuser');
         $this-&gt;load-&gt;library('validate_login','','session_validation');// where validate_login is the custom library class inside applications/libraries/validate_login.php
       }
       function index()
       {
         //my code
         $this-&gt;load-&gt;library('form_validation');
       }
  
      }
  </code></pre>
  
  <p>This is the error i got $this->load->library('form_validation'); it works perfectley.
  i just want to know Why this code works? Am i overwriting the default libraries?</p>
  
  <blockquote>
    <p>Message: Undefined property: VerifyLogin::$form_validation</p>
  </blockquote>
  
  <p>if i load the library after </p>
  
  <pre><code>class VerifyLogin extends CI_Controller {
       function __construct()
       {
         parent::__construct();
         $this-&gt;load-&gt;helper('url'); 
         $this-&gt;load-&gt;model('loginuser');
         $this-&gt;load-&gt;library('form_validation');
         $this-&gt;load-&gt;library('validate_login','','session_validation');// where validate_login is the custom library class inside applications/libraries/validate_login.php
       }
       function index()
       {
         //my code
       }
  
      }
  </code></pre>