Re[2]: [PHP-PEAR] Merging PHPLIB into PEAR

From: Date: Fri, 19 Jan 2001 09:43:36 +0000
Subject: Re[2]: [PHP-PEAR] Merging PHPLIB into PEAR
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-1038@lists.php.net to get a copy of this message
Hello Chuck, Friday, January 19, 2001, 6:11:28 AM, you wrote: CH> If you want to abstract the session name, etc, then you can pull out a CH> Session:: class from Horde cvs's Attic. It abstracted the name, all of the CH> session operations, and was a bare wrapper around the php4 stuff. CH> We dropped it, because it was pointless. We have PHPLib-compliant session classes in PHPLib repository that use PHP4 native sessions. Don't see why not use bare wrapper around session management if it is convenient to use it (with negligible performance loss). CH> If you want to do save_handlers, then that's much CH> better handled with a prepend_file directive. How much better? Better for whom? :) First, PHPLib has CT_* classes that act as storage containers, that have common interfaces and let us store session data almost anywhere (currently SQL databases, DBM files, LDAP directories). So PHPLib abstracts not only Session itself, but also the storage module. Then you'll need functions (that are in PHPLib for ages) for save_handler. Then assume that trans_sid may not work (disabled or non-functional, as it happen) - you'll need function that provide url with SID prepended and function that provide hidden input field for forms (all this is in PHPLib Session already). PHPLib indeed use a auto prepend, but not to place all this into the prepend file - it is used to call necessary components. And you intend to place all this in a prepend file as plain functions? I thought PEAR chose an OO approach because of convenience of using classes and encapsulation of data and functions. Have I been mistaken? CH> PHPlib's session class was designed for when there was no session support in CH> php4. Spooging it onto the current situation doesn't make sense. 1. Yes, PHPLib session class was designed a long ago. So it has become a de facto standard for many many developers as the interface to sessions. Many many applications has been developed using this interface. So if we talk about porting PHPLib into PEAR the compatibility should remain untouched to let those apps work - that means we need Session class in PEAR. 2. Many many users at php-general ask for help with sessions daily. As for now (in my opinion) PEAR itself could be used for nothing more than educational purposes (excuse me if someone is upset), such a class would be a nice illustration. Maybe merging PHPLib in PEAR and reorganization of PEAR would lure developers to commit useful things there. -- Best regards, Max A. Derkachev mailto:kot@books.ru Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 http://www.Books.Ru -- All Books of Russia  

« previous php.pear (#1038) next »