Re: Re: Validate package
| From: | Pierre-Alain Joye | Date: | Sun, 07 Nov 2004 19:40:11 +0000 |
| Subject: | Re: Re: Validate package | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34254@lists.php.net to get a copy of this message | ||
On Sun, 07 Nov 2004 04:25:07 +0100
pear-dev@mocsnik.hu (Norbert Mocsnik) wrote:
> 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].
Not removed, you will mostly need text and/or basics validations
like text, number or email or you would like to use the multiple
methods. I like to keep them there, they should be used by other
validations tools.
> 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.
You will include validate.php because you are likely to validate at
least either text or numbers, and certainly more than one data entry
(multiple).
Another good thing about spliting Validate in smaller packages is
the country-release dependecy. I do not like to make the maintainers
dependant on validate itself. Neither the other way. Validate could
be stable very soon if we do not have to take about the locale
validations tools. It' s a good usage for sub packages (or what we
called subpackages).
Regards,
--Pierre