Re: [RFC] PEAR::Pager changes
| From: | Jeroen Houben | Date: | Thu, 10 Jul 2003 07:19:10 +0000 |
| Subject: | Re: [RFC] PEAR::Pager changes | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-18123@lists.php.net to get a copy of this message | ||
Hi,
I'd like to see them mergd into one package.
Jeroen
Lorenzo Alberton wrote:
On Wed, 9 Jul 2003 21:55:01 +0200, Martin Jansen wrote:If I were you, I'd stop development on one of the packages in favour of the other one. This will free you from a maintenance nightmareNo maintenance nightmares, since both packages are rock solid and stable. I implemented these last modifications only to improve the look&feel of one of them and to match the other one. This done, the development for both packages should reach an end. Anyway, the more I think about it, the more I'm prone to the idea of merging them into one package, with a simple wrapper like this one (or something similar, just to give the idea): ================================ class Pager { function Pager($options); {if(!empty($options['pager_style']) && $options['pager_style'] == 'sliding') { include_once 'Pager/Sliding.php'; return new Pager_Sliding($options); } else { include_once 'Pager/Jumping.php'; //the old PEAR::Pager return new Pager_Jumping($options); }} } ================================and it will be easier for users to choose the right package [tm].how can they choose if there's no alternative? :D :D :D However, with these mods, choosing the right package should be even easier, since the 2 packages are now 100% compatible. Switching between the two is as easy as changing ---- require_once 'Pager/Sliding.php'; $pager = new Pager_Sliding($options); ---- to / from ---- require_once 'Pager/Pager.php'; $pager = new Pager($options); ---- that's it. With the wrapper, it would be reduced to one word only. I'd like to collect some more opinions, though. Best regards, Lorenzo