Re: [RFC] Object oriented session handlers
| From: | Arpad Ray | Date: | Sat, 25 Jun 2011 05:19:07 +0000 |
| Subject: | Re: [RFC] Object oriented session handlers | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53579@lists.php.net to get a copy of this message | ||
On Sat, Jun 25, 2011 at 6:13 AM, Arpad Ray <arraypad@gmail.com> wrote:
> The most significant change is that the shutdown function registers
> another shutdown function when it's called, to (almost) ensure that
> it's always the last one, and therefore user shutdown functions should
> always find the session available as expected. I'd especially
> appreciate feedback or improvements on this because it feels very
> hacky. One option is to add a separate hash of internal shutdown
> functions which run after the user shutdown functions, another is to
> add an element to the module entry, a la RSHUTDOWN, which gets run in
> between steps 1 and 2 in the shutdown process (see main.c:1632).
>
To clarify the "almost" - it's still possible for a user shutdown
function registered after session_set_save_handler() is called, to
register another shutdown function, which would be run after the 2nd
session shutdown function. This is one reason why I prefer the other
methods, but it's a pretty small risk.
Regards,
Arpad