Methods

Returns translator used in object

getTranslator() : \Zend\Validator\Translator\TranslatorInterface | null

Return the translation text domain

getTranslatorTextDomain() : string

Returns

string

Checks if the object has a translator

hasTranslator() : bool

Returns

bool

Returns whether translator is enabled and should be used

isTranslatorEnabled() : bool

Returns

bool

Sets translator to use in helper

setTranslator(\Zend\Validator\Translator\TranslatorInterface $translator, string $textDomain) : \Zend\Validator\Translator\self

Parameters

$translator

\Zend\Validator\Translator\TranslatorInterface

[optional] translator. Default is null, which sets no translator.

$textDomain

string

[optional] text domain Default is null, which skips setTranslatorTextDomain

Returns

\Zend\Validator\Translator\self

Sets whether translator is enabled and should be used

setTranslatorEnabled(bool $enabled) : \Zend\Validator\Translator\self

Parameters

$enabled

bool

[optional] whether translator should be used. Default is true.

Returns

\Zend\Validator\Translator\self

Set translation text domain

setTranslatorTextDomain(string $textDomain) : \Zend\Validator\Translator\TranslatorAwareInterface

Parameters

$textDomain

string

Returns