title: codeigniter hooks can't get $ci object to work
body: <p>I've just started looking at hooks today not 100% sure what I'm doing wrong but I'm getting an error when I try and use the $ci object in my function. </p>
  
  <p>A PHP Error was encountered
  Severity: Notice
  Message: Trying to get property of non-object
  Filename: hooks/language.php
  Line Number: 12</p>
  
  <p>My hooks file looks like this. It's in the hooks directory in my application folder.</p>
  
  <pre><code>class Language{
  
      var $ci;
  
      public function __construct(){
         $this-&gt;ci =&amp; get_instance();
      }
  
      function get_language(){
          echo $this-&gt;ci-&gt;session-&gt;userdata('language');
      }
  }
  </code></pre>
  
  <p>I need to get the value in the session to use in my function. Am I not supposed to do it like this? </p>
  
  <p>Thanks you!</p>