Re: [phplib-dev] Re: [phplib] PHPlib session using PHP4 sessions implementation: the code From: Max Derkachev (kot <email protected>)
Date: 12/05/00

Hi Teo!

Teodor Cimpoesu wrote:

> > > The start as I see it is settling on a session class API( a Session Interface,
> > > to say so).
> > >
> > It has existed before and well documented in the PHPLib docs :). Do we
> > have to redesign the whole class? It could break the compatibility with
> > apps that was built using PHPLib and PHP3.
>
> I sow a lot of doubtful methods, and those were what I was thinking about
> when I wrote the above phrase. I surely know about the session's register()
> is_registered() and delete() but what else do we use from there as related
> to session? umm, maybe hidden_session().

I suppose all the methods should remain - a lot of code has been written using PHPLib, so, if we
change the api, the code won't work. You can not say for sure does anyone uses put_id() in his
app. So does reimport_any_vars and so on. Everybody uses url/purl stuff - so it must produce the
same output, regardless of the trans_sid behavior. Of course, we could hack those methods a bit
if it is possible to use PHP4's cool things.

> [my_super_dooper_session_handlers.inc]
>
> $open =<<<ENDFUNC
> global $sess_save_path, $sess_session_name;
>

.....

>
> [my_hackish_script.php]
> include_once 'my_super_dooper_session_handlers.inc';
> ....

I could not see how it could help. It would be great, if we could place all the session stuff
within a class definition - only this could let us to build the system only by extending
classes. If we can't, the solution is to define the functions (wrappers to class methods)
explicitly - so do I. All the rest is within the class, even session_set_save_handler - it is
called in set_container. The names of those wrappers are passed to it as arguments.

--
Best regards,
Max A. Derkachev mailto:kot <email protected>
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-5353
http://www.Books.Ru -- All Books of Russia

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected> For additional commands, e-mail: phplib-dev-help <email protected>