title: Which method is used to store cookie data into session file
body: <p>I am using a small PHP framework.</p>
  
  <p>When calling <code>session_start()</code>, a class implementing <code>SessionHandlerInterface</code> 
  allows a creation of the cookie file throught its method <code>read($id)</code>.  </p>
  
  <p>A file like <code>sess_533stse23wsdd23rs</code> is created on disk. Good. </p>
  
  <p>Eventually a further call to the <code>SessionHandlerInterface</code> implementation writes more information in the cookie server file.  This information can be viewed on call to <code>write($id, $data)</code>.</p>
  
  <p>When debugging, I break in the <code>write</code> method implementation and view the <code>call stack</code> and see a call from session_write_close().  I cannot discover where the data passed as parameter to the <code>write</code> is coming from.  I do not seem to have this info from the debugger.  This type of information is not accessible:</p>
  
  <blockquote>
    <p>session_write_close(){</p>
    
    <p>// Where this $data is coming from ? </p>
    
    <p>handler...write( $id, $data )</p>
    
    <p>}</p>
  </blockquote>
  
  <p>In PHP, is there a method to save information to the cookie, so that a call to the session_write_close() will flush this information to the persistent file on disk ?</p>