\Horde_Form_Type_monthdayyear

Horde_Form_Type Class

Summary

Methods
Properties
Constants
getProperty()
__get()
setProperty()
__set()
init()
onSubmit()
isValid()
getTypeName()
getValues()
getInfo()
emptyDateArray()
getDateParts()
getDateOb()
formatDate()
_validateAndFormat()
about()
$_start_year
$_end_year
$_picker
$_format_in
$_format_out
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$_start_year

$_start_year : 

Type

$_end_year

$_end_year : 

Type

$_picker

$_picker : 

Type

$_format_in

$_format_in : 

Type

$_format_out

$_format_out : 

Type

Methods

getProperty()

getProperty(  $property) 

Parameters

$property

__get()

__get(  $property) 

Parameters

$property

setProperty()

setProperty(  $property,   $value) 

Parameters

$property
$value

__set()

__set(  $property,   $value) 

Parameters

$property
$value

init()

init(integer  $start_year = '', integer  $end_year = '', boolean  $picker = true, integer  $format_in = null, integer  $format_out = '%x') 

Return the date supplied as a Horde_Date object.

Parameters

integer $start_year

The first available year for input.

integer $end_year

The last available year for input.

boolean $picker

Do we show the DHTML calendar?

integer $format_in

The format to use when sending the date for storage. Defaults to Unix epoch. Similar to the strftime() function.

integer $format_out

The format to use when displaying the date. Similar to the strftime() function.

onSubmit()

onSubmit() 

isValid()

isValid(  $var,   $vars,   $value,   $message) 

Parameters

$var
$vars
$value
$message

getTypeName()

getTypeName() 

getValues()

getValues() 

getInfo()

getInfo(  $vars,   $var,   $info) 

Insert the date input through the form into $info array, in the format specified by the $format_in parameter when setting up monthdayyear field.

Parameters

$vars
$var
$info

emptyDateArray()

emptyDateArray(mixed  $date) : integer

Determine if the provided date value is completely empty, partially empty or non-empty.

Parameters

mixed $date

String or date part array representation of date.

Returns

integer —

0 for non-empty, 1 for completely empty or -1 for partially empty.

getDateParts()

getDateParts(string  $date_in) : array

Return the date supplied split up into an array.

Parameters

string $date_in

Date in one of the three formats supported by Horde_Form and Horde_Date (ISO format YYYY-MM-DD HH:MM:SS, timestamp YYYYMMDDHHMMSS and UNIX epoch) plus the fourth YYYY-MM-DD.

Returns

array —

Array with three elements - year, month and day.

getDateOb()

getDateOb(string  $date_in) : \Horde_Date

Return the date supplied as a Horde_Date object.

Parameters

string $date_in

Date in one of the three formats supported by Horde_Form and Horde_Date (ISO format YYYY-MM-DD HH:MM:SS, timestamp YYYYMMDDHHMMSS and UNIX epoch) plus the fourth YYYY-MM-DD.

Returns

\Horde_Date —

The date object.

formatDate()

formatDate(string  $date) : string

Return the date supplied as a Horde_Date object.

Parameters

string $date

Either an already set up Horde_Date object or a string date in one of the three formats supported by Horde_Form and Horde_Date (ISO format YYYY-MM-DD HH:MM:SS, timestamp YYYYMMDDHHMMSS and UNIX epoch) plus the fourth YYYY-MM-DD.

Returns

string —

The date formatted according to the $format_out parameter when setting up the monthdayyear field.

_validateAndFormat()

_validateAndFormat(  $value,   $var) 

Validate/format a date submission.

Parameters

$value
$var

about()

about() 

Return info about field type.