What exactly does this "$this -> session -> userdata("datiPreventivo");" into a CodeIgniter controller class?
<p>I am a Java developer (I often used Spring MVC to develop MVC web app in Java) with a very litle knowledge of PHP and I have to work on a PHP project that use <strong>CodeIgniter 2.1.3</strong>.</p>

<p>So I have the following doubt about how exactly work this controller method:</p>

<p>So I have this class:</p>

<pre><code>class garanzieValoreFlex extends CI_Controller {

    ..................................................... 
    ..................................................... 
    ..................................................... 

   public function index() {

        $this-&gt;load-&gt;model('Direct');
        $flagDeroga = "true" ;

        $this-&gt;session-&gt;userdata("flagDeroga");

        $data = $this-&gt;session-&gt;userdata("datiPreventivo");
        $this-&gt;load-&gt;model('GaranzieValoreFlexModel');

        $data = $this-&gt;session-&gt;userdata("datiPreventivo");
        $this-&gt;load-&gt;model('GaranzieValoreFlexModel');

        $this-&gt;load-&gt;view('garanziavalore/index_bootstrap',$data);
    }

}
</code></pre>

<p>I know that the <strong>index()</strong> method of the <strong>garanzieValoreFlex</strong> controller class handle HTTP Request toward the URL: <strong><a href="http://MYURL/garanzieValoreFlex" rel="nofollow">http://MYURL/garanzieValoreFlex</a></strong> and show the <strong>/views/garanzievalore/index_bootstrap.php</strong> page.</p>

<p>It works fine. The only think that I can't understand is what exactly does this code line:</p>

<pre><code>$data = $this -&gt; session -&gt; userdata("datiPreventivo");
</code></pre>

<p>Can you help me what exactly is doing? I think that it is putting something into the HttpSession or something like this but I am absolutly not sure about it and I can't understand the logic. </p>