Re: Re: Validate package

From: Date: Sun, 07 Nov 2004 03:25:07 +0000
Subject: Re: Re: Validate package
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-34245@lists.php.net to get a copy of this message
davey@php.net (Davey) wrote:
What if Validate.php included all the code into it that it currently has? So if you do require_once 'Validate.php'; you would get all the functions that were there before. But if you only want to validate e-mail you could do require_once 'Validate/Email.php';
This seems to be the best but as Lukas mentioned, this needs ~10 requires (slows things down). At the same time, this doesn't break BC. As I'd never require_once 'Validate.php' directly, this is what I like the best. Keeping Validate.php which includes all the other provides BC [and this file might be removed in v2]. Pierre-Alain Joye wrote:
And if you like to valide more you will include many files, it's good and fast enough to keep "common" functions in Validate.php and do not split them in many files. ISSN, sscc and some other should move out of Validate, as they are certainly required by most of our users.
Another way to go.. :) But this breaks BC and doesn't help me at all. I want to integrate Validate into other open source projects, many of them cares about how much code to include and why. So what? -- Regards, Norbert Mocsnik http://norbert.mocsnik.hu/

« previous php.pear.dev (#34245) next »