On 02/06/2009 11:49 PM, Mary Nicole Hicks wrote:


When I use Zend_Uri_Http::check($string)
Which Uses: Zend_Validate_Hostname
Which Uses: Zend_Validate_Abstract
Which Uses: Zend_Registry?

Well, the abstract validation class facilitates automatic error message translation, if you're using a translator. It simply checks a few common places to see if there is a translation instance registered; one of these being Zend_Registry.

You can disable this lookup by passing true to the setDisableTranslator method of a validator, however this, unfortunately is only available as an instance method. Likely, it wouldn't really help you much.

I agree it's somewhat unfortunate that there are these occasional registry lookups. It is extraordinarily wasteful (if you're not using the registry) to load a class and instantiate an object, just to find out something you're not even using isn't there.

I have a feeling that this will be changing over the next couple of releases. Since there's now unified way of instantiating and managing resources with 1.8, hopefully all these older holdovers will be eventually eliminated.

Reply via email to