API Documentation

Validate/Date.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
version
$Id: Date.php 22697 2010-07-26 21:14:47Z alexander $
Classes
Zend_Validate_Date

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Validate_Date

Extends from
Zend_Validate_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
Constants
INVALID
INVALID_DATE
FALSEFORMAT
Properties
$_messageTemplates
$_messageVariables
$_format
$_locale
Methods
__construct
getLocale
setLocale
getFormat
setFormat
isValid
_checkFormat

Description

Constants

INVALID

 INVALID = 'dateInvalid'

Details

value
dateInvalid

INVALID_DATE

 INVALID_DATE = 'dateInvalidDate'

Details

value
dateInvalidDate

FALSEFORMAT

 FALSEFORMAT = 'dateFalseFormat'

Details

value
dateFalseFormat

Properties

$_format

string|null $_format = ''

Optional format

Details

$_format
string|null
visibility
protected
default
final
false
static
false

$_locale

string|Zend_Locale|null $_locale = ''

Optional locale

Details

$_locale
string|Zend_Locale|null
visibility
protected
default
final
false
static
false

$_messageTemplates

array $_messageTemplates = 'array'

Validation failure message template definitions

Details

$_messageTemplates
array
visibility
protected
default
array
final
false
static
false

$_messageVariables

array $_messageVariables = 'array'

Details

$_messageVariables
array
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct( string|Zend_Config $options = array ) : void

Sets validator options

Arguments
$options
stringZend_Config
OPTIONAL
Details
visibility
public
final
false
static
false

_checkFormat

_checkFormat( string $value ) : boolean

Check if the given date fits the given format

Arguments
$value
string
Date to check
Output
boolean
False when date does not fit the format
Details
visibility
private
final
false
static
false

getFormat

getFormat( ) : string|null

Returns the locale option

Output
string|null
Details
visibility
public
final
false
static
false

getLocale

getLocale( ) : string|Zend_Locale|null

Returns the locale option

Output
string|Zend_Locale|null
Details
visibility
public
final
false
static
false

isValid

isValid( string|array|Zend_Date $value ) : boolean

Defined by Zend_Validate_Interface

Returns true if $value is a valid date of the format YYYY-MM-DD If optional $format or $locale is set the date format is checked according to Zend_Date, see Zend_Date::isDate()

Arguments
$value
stringarrayZend_Date
Output
boolean
Details
visibility
public
final
false
static
false

setFormat

setFormat( string $format = null ) : Zend_Validate_Date

Sets the format option

Arguments
$format
string
Output
Zend_Validate_Date
provides a fluent interface
Details
visibility
public
final
false
static
false

setLocale

setLocale( string|Zend_Locale $locale = null ) : Zend_Validate_Date

Sets the locale option

Arguments
$locale
stringZend_Locale
Output
Zend_Validate_Date
provides a fluent interface
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.