Skip to content

Commit c3a8e27

Browse files
committed
docs: Apply suggestion
1 parent 4ba0b04 commit c3a8e27

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

user_guide_src/source/libraries/sessions.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,15 +344,13 @@ intend to reuse that same key in the same request, you'd want to use
344344

345345
.. literalinclude:: sessions/036.php
346346

347-
Flag Manipulation
348-
=================
347+
Changing the Session Key Type
348+
=============================
349349

350-
Since the data is stored in the session and the Flashdata/Tempdata methods only manipulates flags, you can change the type for one value.
350+
Since session data values like Flashdata and Tempdata are differentiated only by internal flags, you can change a value's type without rewriting its data.
351351

352352
.. literalinclude:: sessions/045.php
353353

354-
You may never use it, but know that it works.
355-
356354
Closing a Session
357355
=================
358356

user_guide_src/source/libraries/sessions/045.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
* echo session()->getFlashdata('alerts');
99
*/
1010

11-
// Switch flag
11+
// You can switch the session key type from Flashdata to Tempdata like this:
1212
session()->markAsTempdata('alerts');
1313

14-
// or rewrite
14+
// Or simply rewrite it directly
1515
session()->setTempdata('alerts', 'Operation success!');
1616

1717
/**

0 commit comments

Comments
 (0)