rfc:user_defined_session_serializer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:user_defined_session_serializer [2016/11/17 10:52] yohgakirfc:user_defined_session_serializer [2016/11/30 05:26] – Add return value description. yohgaki
Line 28: Line 28:
 $serialize_func = function(array $session_data_array) { $serialize_func = function(array $session_data_array) {
   // User can add/encrypt data in this function   // User can add/encrypt data in this function
-  return serialize($session_data_array);+  // Returning anything other than string raises E_RECOVERABLE_ERROR 
 +  return serialize($session_data_array); // Must return string
 } }
  
 $unserialize_func = function(string $session_data_string) { $unserialize_func = function(string $session_data_string) {
   // User can remove/decrypt/validate data in this function   // User can remove/decrypt/validate data in this function
-  return unserialize($session_data_string);+  // Returning anything other than array raises E_RECOVERABLE_ERROR 
 +  return unserialize($session_data_string); // Must return array
 } }
 </code> </code>
Line 46: Line 48:
 </code> </code>
  
-These function/methods are called before reading/writing session data to session data database.+session_set_serializer() accepts object implements SessionSerializerInterface. 
 + 
 +<code php> 
 +bool session_set_serializer(SessionSerializerInterface $handler) 
 +</code> 
 + 
 +These functions/methods are called before reading/writing session data to session data database.
  
 Please refer to the pull request phpt files for usage details.  Please refer to the pull request phpt files for usage details. 
Line 67: Line 75:
  
 50%+1 majority is required to pass. 50%+1 majority is required to pass.
 +
 +Vote starts: 2016-XX-XX  Vote ends: 2016-XX-XX UTC 23:59:59
  
 <doodle title="Add user defined session serializer" auth="yohgaki" voteType="single" closed="true"> <doodle title="Add user defined session serializer" auth="yohgaki" voteType="single" closed="true">
Line 73: Line 83:
 </doodle> </doodle>
  
-Vote starts: 2016-XX-XX 
- 
-Vote ends: 2016-XX-XX UTC 23:59:59 
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
rfc/user_defined_session_serializer.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1