Re: [phplib-dev] Re: [phplib] PHPlib session using PHP4 sessions implementation: the code From: Sascha Schumann (sascha <email protected>)
Date: 12/04/00

> > The problem with it is that the handlers for session_set_save_handler()
> > ought to be simple functions, not class methods. the function takes only
> > string arguments, so we have to use wrappers for class methods outside
> > the class, and session_set_save_handler() should refer to those
> > wrappers. And, because of this, the task could not be done only by
> > constructing Session_* inheritance chain.
>
> Well, it's true that the way Sascha wrote this wonderful extension to PHP4
> was in his style, namely `structured' :) but I guess he forethought one can
> wrap all those function into an OO style interface. So there should be a
> solution out there (Note: coding hints follow below).

    session_set_save_handler can also call functions in
    instantiated objects, if you prefer that.

    Just change "func_name" for each function entry to
    array("object_name", "method_name") in the
    session_set_save_handler call.

    - Sascha

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