Hi,
I’m writing an extension which uses two hooks and I need to pass some data from a function attached to one hook to the function attached to another hook.
I thought that this could be done passing some variable to $SESS->cache in one function as here
$SESS->cache['my_class_name']['_my_variable_name'] = $my_variable;and later taking its value in another function as here
$my_variable = $SESS->cache['my_class_name']['_my_variable_name'];but found that this does not work.
Does $SESS->cache cannot be used for passing data from one method to another in extension? Or I try to use it incorrectly?
Or to pass data from one method to another one necessarily should use a database table?
Thanks in advance.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.