Class Explode

Summary

Fully Qualified Name: Laminas\Validator\Explode
Extends: AbstractValidator
Implements: ValidatorPluginManagerAwareInterface

Description

Methods

Name Description Defined By
__construct() Abstract constructor for all validators A validator should accept following parameters: - nothing f.e. Validator() - one or multiple scalar values f.e. Validator($first, $second, $third) - an array f.e. Validator(array($first => 'first', $second => 'second', $third => 'third')) - an instance of Traversable f.e. Validator($config_instance) AbstractValidator
__get() Magic function returns the value of the requested property, if and only if it is the value or a message variable. AbstractValidator
__invoke() Invoke as command AbstractValidator
getDefaultTranslator() Get default translation object for all validate objects AbstractValidator
getDefaultTranslatorTextDomain() Get default translation text domain for all validate objects AbstractValidator
getMessageLength() Returns the maximum allowed message length AbstractValidator
getMessageTemplates() Returns the message templates from the validator AbstractValidator
getMessageVariables() Returns an array of the names of variables that are used in constructing validation failure messages AbstractValidator
getMessages() Returns array of validation failure messages AbstractValidator
getOption() Returns an option AbstractValidator
getOptions() Returns all available options AbstractValidator
getTranslator() Return translation object AbstractValidator
getTranslatorTextDomain() Return the translation text domain AbstractValidator
getValidator() Gets the Validator for validating each value Explode
getValidatorPluginManager() Get validator plugin manager Explode
getValueDelimiter() Returns the delimiter string that the values will be split upon Explode
hasDefaultTranslator() Is there a default translation object set? AbstractValidator
hasTranslator() Does this validator have its own specific translator? AbstractValidator
isBreakOnFirstFailure() Get break on first failure setting Explode
isTranslatorEnabled() Is translation enabled? AbstractValidator
isValid() Defined by Laminas\Validator\ValidatorInterface Explode
isValueObscured() Retrieve flag indicating whether or not value should be obfuscated in messages AbstractValidator
setBreakOnFirstFailure() Set break on first failure setting Explode
setDefaultTranslator() Set default translation object for all validate objects AbstractValidator
setDefaultTranslatorTextDomain() Set default translation text domain for all validate objects AbstractValidator
setMessage() Sets the validation failure message template for a particular key AbstractValidator
setMessageLength() Sets the maximum allowed message length AbstractValidator
setMessages() Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings. AbstractValidator
setOptions() Sets one or multiple options AbstractValidator
setTranslator() Set translation object AbstractValidator
setTranslatorEnabled() Indicate whether or not translation should be enabled AbstractValidator
setTranslatorTextDomain() Set translation text domain AbstractValidator
setValidator() Sets the Validator for validating each value Explode
setValidatorPluginManager() Set validator plugin manager Explode
setValueDelimiter() Sets the delimiter string that the values will be split upon Explode
setValueObscured() Set flag indicating whether or not value should be obfuscated in messages AbstractValidator

Method Details

__construct()

Abstract constructor for all validators A validator should accept following parameters: - nothing f.e. Validator() - one or multiple scalar values f.e. Validator($first, $second, $third) - an array f.e. Validator(array($first => 'first', $second => 'second', $third => 'third')) - an instance of Traversable f.e. Validator($config_instance)

Parameter Name Type Description
$options array|\Traversable

Returns:

__get()

Magic function returns the value of the requested property, if and only if it is the value or a message variable.

Parameter Name Type Description
$property string

Returns: mixed

__invoke()

Invoke as command

Parameter Name Type Description
$value mixed

Returns: bool

getDefaultTranslator()

Get default translation object for all validate objects

Returns: \Translator\TranslatorInterface|null

getDefaultTranslatorTextDomain()

Get default translation text domain for all validate objects

Returns: string

getMessageLength()

Returns the maximum allowed message length

Returns: int

getMessageTemplates()

Returns the message templates from the validator

Returns: array

getMessageVariables()

Returns an array of the names of variables that are used in constructing validation failure messages

Returns: array

getMessages()

Returns array of validation failure messages

Returns: array

getOption()

Returns an option

Parameter Name Type Description
$option string Option

Returns: mixed Returned option

getOptions()

Returns all available options

Returns: array Array with all available options

getTranslator()

Return translation object

Returns: \Translator\TranslatorInterface|null

getTranslatorTextDomain()

Return the translation text domain

Returns: string

getValidator()

Gets the Validator for validating each value

Returns: \ValidatorInterface

getValidatorPluginManager()

Get validator plugin manager

Returns: \ValidatorPluginManager

getValueDelimiter()

Returns the delimiter string that the values will be split upon

Returns: string

hasDefaultTranslator()

Is there a default translation object set?

Returns: bool

hasTranslator()

Does this validator have its own specific translator?

Returns: bool

isBreakOnFirstFailure()

Get break on first failure setting

Returns: bool

isTranslatorEnabled()

Is translation enabled?

Returns: bool

isValid()

Defined by Laminas\Validator\ValidatorInterface

Returns true if all values validate true

Parameter Name Type Description
$value mixed
$context mixed Extra

Returns: bool

isValueObscured()

Retrieve flag indicating whether or not value should be obfuscated in messages

Returns: bool

setBreakOnFirstFailure()

Set break on first failure setting

Parameter Name Type Description
$break bool

Returns: $this

setDefaultTranslator()

Set default translation object for all validate objects

Parameter Name Type Description
$translator \Translator\TranslatorInterface|null
$textDomain string (optional)

Returns: void

setDefaultTranslatorTextDomain()

Set default translation text domain for all validate objects

Parameter Name Type Description
$textDomain string

Returns: void

setMessage()

Sets the validation failure message template for a particular key

Parameter Name Type Description
$messageString string
$messageKey string OPTIONAL

Returns: $this Provides a fluent interface

setMessageLength()

Sets the maximum allowed message length

Parameter Name Type Description
$length int

Returns:

setMessages()

Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings.

Parameter Name Type Description
$messages array

Returns: $this

setOptions()

Sets one or multiple options

Parameter Name Type Description
$options array|\Traversable Options

Returns: $this Provides fluid interface

setTranslator()

Set translation object

Parameter Name Type Description
$translator \Translator\TranslatorInterface|null
$textDomain string (optional)

Returns: $this

setTranslatorEnabled()

Indicate whether or not translation should be enabled

Parameter Name Type Description
$flag bool

Returns: $this

setTranslatorTextDomain()

Set translation text domain

Parameter Name Type Description
$textDomain string

Returns: $this

setValidator()

Sets the Validator for validating each value

Parameter Name Type Description
$validator \ValidatorInterface|array

Returns: $this

setValidatorPluginManager()

Set validator plugin manager

Parameter Name Type Description
$pluginManager \ValidatorPluginManager

Returns:

setValueDelimiter()

Sets the delimiter string that the values will be split upon

Parameter Name Type Description
$delimiter string

Returns: $this

setValueObscured()

Set flag indicating whether or not value should be obfuscated in messages

Parameter Name Type Description
$flag bool

Returns: $this

Top