How can an object be empty? It's an instance of a class. So it is something.

On 4-3-2010 17:55, Alayn Gortazar wrote:
El jue, 04-03-2010 a las 08:32 -0800, Hector Virgen escribió:
You could create an "Empty" interface (or rather, Emptiable since I
don't think you can use Empty):


interface Emptiable
{
     public function isEmpty();
}


Then make your validator accept Emptiable objects along with strings,
arrays, ints, etc.


Maybe you can come up with a better name than Emptiable :)
Yep you can always extend NotEmpty validator and add particular cases.

I was just wondering if Zend really needed such a "feature", don't
really think so.

Thanks anyway, ;)



Reply via email to