Re: Session: PS(mod)->create() or PS(mod)->read() parameter?
| From: | Yasuo Ohgaki | Date: | Thu, 29 Jan 2015 09:30:24 +0000 |
| Subject: | Re: Session: PS(mod)->create() or PS(mod)->read() parameter? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81365@lists.php.net to get a copy of this message | ||
Hi all,
On Thu, Jan 29, 2015 at 5:24 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> A new API seems really cleaner.
>
>
> Reasonable discussion. I'll prepare API version patch later.
This is the patch. It's not complete as user save handler requires more
work.
Simply read() is called as create() now. It's a PoC patch.
https://github.com/yohgaki/php-src/compare/master-session-new-api2
It's not too complex compared to parameter version.
https://github.com/yohgaki/php-src/compare/master-session-new-api
The issue with create() is that it enforces save handlers to implement
create(). It may be implemented that to check null handler to allow
save handler w/o create(), but it wouldn't look nice.
Since all save handlers must be rewritten for PHP7, it would be the
best to have only one save handler definition for internal save handlers
while keeping user save handler compatibility. Dirty part can be hidden
in mod_user.c.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net