Class DateStep

Summary

Fully Qualified Name: Zend\Validator\DateStep
Extends: Date

Description

Methods

Name Description Defined By
__construct() Set default options for this instance DateStep
__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
getBaseValue() Returns the base value from which the step should be computed DateStep
getDefaultTranslator() Get default translation object for all validate objects AbstractValidator
getDefaultTranslatorTextDomain() Get default translation text domain for all validate objects AbstractValidator
getFormat() Returns the format option Date
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
getStep() Returns the step date interval DateStep
getTimezone() Returns the timezone option DateStep
getTranslator() Return translation object AbstractValidator
getTranslatorTextDomain() Return the translation text domain AbstractValidator
hasDefaultTranslator() Is there a default translation object set? AbstractValidator
hasTranslator() Does this validator have its own specific translator? AbstractValidator
isTranslatorEnabled() Is translation enabled? AbstractValidator
isValid() Returns true if a date is within a valid step DateStep
isValueObscured() Retrieve flag indicating whether or not value should be obfuscated in messages AbstractValidator
setBaseValue() Sets the base value from which the step should be computed DateStep
setDefaultTranslator() Set default translation object for all validate objects AbstractValidator
setDefaultTranslatorTextDomain() Set default translation text domain for all validate objects AbstractValidator
setFormat() Sets the format option Date
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
setStep() Sets the step date interval DateStep
setTimezone() Sets the timezone option DateStep
setTranslator() Set translation object AbstractValidator
setTranslatorEnabled() Indicate whether or not translation should be enabled AbstractValidator
setTranslatorTextDomain() Set translation text domain AbstractValidator
setValueObscured() Set flag indicating whether or not value should be obfuscated in messages AbstractValidator

Method Details

__construct()

Set default options for this instance

Parameter Name Type Description
$options array

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

getBaseValue()

Returns the base value from which the step should be computed

Returns: string|int|\DateTime

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

getFormat()

Returns the format option

Returns: string|null

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

getStep()

Returns the step date interval

Returns: \DateInterval

getTimezone()

Returns the timezone option

Returns: \DateTimeZone

getTranslator()

Return translation object

Returns: \Translator\TranslatorInterface|null

getTranslatorTextDomain()

Return the translation text domain

Returns: string

hasDefaultTranslator()

Is there a default translation object set?

Returns: bool

hasTranslator()

Does this validator have its own specific translator?

Returns: bool

isTranslatorEnabled()

Is translation enabled?

Returns: bool

isValid()

Returns true if a date is within a valid step

Parameter Name Type Description
$value string|int|\DateTime

Returns: bool

isValueObscured()

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

Returns: bool

setBaseValue()

Sets the base value from which the step should be computed

Parameter Name Type Description
$baseValue string|int|\DateTime

Returns: \DateStep

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

setFormat()

Sets the format option

Format cannot be null. It will always default to 'Y-m-d', even if null is provided.

Parameter Name Type Description
$format string

Returns: \Date provides a fluent interface

setMessage()

Sets the validation failure message template for a particular key

Parameter Name Type Description
$messageString string
$messageKey string OPTIONAL

Returns: \AbstractValidator 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: \AbstractValidator

setOptions()

Sets one or multiple options

Parameter Name Type Description
$options array|\Traversable Options

Returns: \AbstractValidator Provides fluid interface

setStep()

Sets the step date interval

Parameter Name Type Description
$step \DateInterval

Returns: \DateStep

setTimezone()

Sets the timezone option

Parameter Name Type Description
$timezone \DateTimeZone

Returns: \DateStep

setTranslator()

Set translation object

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

Returns: \AbstractValidator

setTranslatorEnabled()

Indicate whether or not translation should be enabled

Parameter Name Type Description
$flag bool

Returns: \AbstractValidator

setTranslatorTextDomain()

Set translation text domain

Parameter Name Type Description
$textDomain string

Returns: \AbstractValidator

setValueObscured()

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

Parameter Name Type Description
$flag bool

Returns: \AbstractValidator

Top