API Documentation

Zend/Validate/Date.php

Show: inherited
Table of Contents

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.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Validate  
Version
$Id: Date.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Validate_Date

Package: Zend\Validate

Parent(s)
\Zend_Validate_Abstract
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  INVALID = 'dateInvalid'
Constant  INVALID_DATE = 'dateInvalidDate'
Constant  FALSEFORMAT = 'dateFalseFormat'

Properties

Propertyprotectedstring|null  $_format= ''

Optional format

Details
Type
stringnull
Propertyprotectedstring|\Zend_Locale|null  $_locale= ''

Optional locale

Details
Type
string\Zend_Localenull
Propertyprotectedarray  $_messageTemplates= 'array( self::INVALID => "Invalid type given. String, integer, array or Zend_Date expected"'

Validation failure message template definitions

Default valuearray( self::INVALID => "Invalid type given. String, integer, array or Zend_Date expected"Details
Type
array
Propertyprotectedarray  $_messageVariables= 'array( 'format' => '_format' )'

Default valuearray( 'format' => '_format' )Details
Type
array

Methods

methodpublic__construct( string|\Zend_Config $options = array() ) : void

Sets validator options

Parameters
Name Type Description
$options string|\Zend_Config

OPTIONAL

methodprivate_checkFormat( string $value ) : boolean

Check if the given date fits the given format

Parameters
Name Type Description
$value string

Date to check

Returns
Type Description
boolean False when date does not fit the format
methodpublicgetFormat( ) : string|null

Returns the locale option

Returns
Type Description
string|null
methodpublicgetLocale( ) : string|\Zend_Locale|null

Returns the locale option

Returns
Type Description
string|\Zend_Locale|null
methodpublicisValid( 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()

Parameters
Name Type Description
$value string|array|\Zend_Date
Returns
Type Description
boolean
methodpublicsetFormat( string $format = null ) : \Zend_Validate_Date

Sets the format option

Parameters
Name Type Description
$format string
Returns
Type Description
\Zend_Validate_Date provides a fluent interface
methodpublicsetLocale( string|\Zend_Locale $locale = null ) : \Zend_Validate_Date

Sets the locale option

Parameters
Name Type Description
$locale string|\Zend_Locale
Returns
Type Description
\Zend_Validate_Date provides a fluent interface
Documentation was generated by DocBlox 0.15.1.