Re: PHP 4.0 Bug #5152: Object passed in a session generateserrors when member functions are called
| From: | php4 at developersdesk dot com | Date: | Thu, 22 Jun 2000 15:15:57 +0000 |
| Subject: | Re: PHP 4.0 Bug #5152: Object passed in a session generateserrors when member functions are called | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-21982@lists.php.net to get a copy of this message | ||
Addressed to: waldschrott <waldschrott@kiffen.de>
PHP Development <php-dev@lists.php.net>
** Reply to note from waldschrott <waldschrott@kiffen.de> Thu, 22 Jun 2000 20:22:00 +0200
>
> > I think this would be great, personally. And if you really want to avoid name
> > clashes, just make a new HTTP_SESSION_VARS array (maybe
> > HTTP_SESSION_<namespace>_VARS?) for each namespace...
>
> That solution would fit into the current model I think, Andrei´s
> worry about what overrides what importing an arbitrary namespace
> into the global one could be eleminated using some sort of a
> "namespace_order" like the "gpc_order" with simple options like
> "prevent_override" (which prevents variables to be overwritten in
> the global namespace, if special variables are needed with priority
> one could fetch them directly from "session_[namespace]_vars") and
> "allow_override" (which allow all existing variables to be
> overwritten) which can be set for every namespace...
>
How about:
session_start( [ string namespace ] );
session_start() # load the global namespace
session_start( 'calendar' ); # load the calendar's namespace
session_start( 'todo' ); # load the todo namespace
in this case, the todo's variables would win, but I could get duplicate
values out of $SESSION_VARS[ 'foo' ] (which is the same as
$SESSION_GLOBAL_VARS[ 'foo' ]) or $SESSION_CALENDAR_VARS[ 'foo' ] or
$SESSION_TODO_VARS[ 'foo' ] as needed.
Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com