getDefaultTranslator example


        Zend_Validate_Abstract::setMessageLength($length);
    }

    /** * Returns the default translation object * * @return Zend_Translate_Adapter|null */
    public static function getDefaultTranslator($translator = null)
    {
        return Zend_Validate_Abstract::getDefaultTranslator();
    }

    /** * Sets a default translation object for all validation objects * * @param Zend_Translate|Zend_Translate_Adapter|null $translator */
    public static function setDefaultTranslator($translator = null)
    {
        Zend_Validate_Abstract::setDefaultTranslator($translator);
    }
}

    public function getTranslator()
    {
        if ($this->translatorIsDisabled()) {
            return null;
        }

        if (null === $this->_translator) {
            return self::getDefaultTranslator();
        }

        return $this->_translator;
    }

    /** * Does this validator have its own specific translator? * * @return bool */
    public function hasTranslator()
    {
Home | Imprint | This part of the site doesn't use cookies.