CodeIgniter Forums
Legacy code: set_flashdata() - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: Legacy code: set_flashdata() (/showthread.php?tid=65510)



Legacy code: set_flashdata() - RHF - 06-20-2016

The CodeIgniter User Guide for v.3.0.6 states that set_flashdata() is a legacy method kept only for backwards compatibility.
What is the suggested method when it is used with two parameters; i.e. set_flashdata($key, $value)?

Thanks


RE: Legacy code: set_flashdata() - ciadmin - 06-20-2016

A number of the Session library methods are flagged as "legacy", and the suggestion is to access $_SESSION directly.
That strikes me as odd, given the intent of flashdata, for instance, which does not have an equivalent in native PHP sessions.
I am not aware of plans to remove these methods.


RE: Legacy code: set_flashdata() - RHF - 06-21-2016

(06-20-2016, 03:36 PM)ciadmin Wrote: A number of the Session library methods are flagged as "legacy", and the suggestion is to access $_SESSION directly.
That strikes me as odd, given the intent of flashdata, for instance, which does not have an equivalent in native PHP sessions.
I am not aware of plans to remove these methods.

OK.  I guess I will just continue to use set_flashdata().
Thanks.