PHP Class Horde_Form_Type_monthdayyear, horde

Inheritance: extends Horde_Form_Type
显示文件 Open project: horde/horde

Public Properties

Property Type Description
$_end_year
$_format_in
$_format_out
$_picker
$_start_year

Public Methods

Method Description
_validateAndFormat ( $value, &$var ) Validate/format a date submission.
about ( ) Return info about field type.
emptyDateArray ( mixed $date ) : integer Determine if the provided date value is completely empty, partially empty or non-empty.
formatDate ( string $date ) : string Return the date supplied as a Horde_Date object.
getDateOb ( string $date_in ) : Horde_Date Return the date supplied as a Horde_Date object.
getDateParts ( string $date_in ) : array Return the date supplied split up into an array.
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.
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.
isValid ( &$var, &$vars, $value, &$message )

Method Details

_validateAndFormat() public method

Validate/format a date submission.
public _validateAndFormat ( $value, &$var )

about() public method

Return info about field type.
public about ( )

emptyDateArray() public method

Determine if the provided date value is completely empty, partially empty or non-empty.
public emptyDateArray ( mixed $date ) : integer
$date mixed String or date part array representation of date.
return integer 0 for non-empty, 1 for completely empty or -1 for partially empty.

formatDate() public method

Return the date supplied as a Horde_Date object.
public formatDate ( string $date ) : string
$date string 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.
return string The date formatted according to the $format_out parameter when setting up the monthdayyear field.

getDateOb() public method

Return the date supplied as a Horde_Date object.
public getDateOb ( string $date_in ) : Horde_Date
$date_in 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.
return Horde_Date The date object.

getDateParts() public method

Return the date supplied split up into an array.
public getDateParts ( string $date_in ) : array
$date_in 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.
return array Array with three elements - year, month and day.

getInfo() public method

Insert the date input through the form into $info array, in the format specified by the $format_in parameter when setting up monthdayyear field.
public getInfo ( &$vars, &$var, &$info )

init() public method

Return the date supplied as a Horde_Date object.
public init ( integer $start_year = '', integer $end_year = '', boolean $picker = true, integer $format_in = null, integer $format_out = '%x' )
$start_year integer The first available year for input.
$end_year integer The last available year for input.
$picker boolean Do we show the DHTML calendar?
$format_in integer The format to use when sending the date for storage. Defaults to Unix epoch. Similar to the strftime() function.
$format_out integer The format to use when displaying the date. Similar to the strftime() function.

isValid() public method

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

Property Details

$_end_year public_oe property

public $_end_year

$_format_in public_oe property

public $_format_in

$_format_out public_oe property

public $_format_out

$_picker public_oe property

public $_picker

$_start_year public_oe property

public $_start_year