TaniPHP
[ class tree: TaniPHP ] [ index: TaniPHP ] [ all elements ]

Class: DateField

Source Location: /fields.php

Class Overview

Field
   |
   --DateField

Creates a composite field for date selection.


Author(s):

  • Dumitru Postoronca

Methods


Inherited Variables

Inherited Methods

Class: Field

Field::getHtml()
Renders the object in HTML code
Field::out()
Outputs the field in XHTML format

Class Details

[line 362]
Creates a composite field for date selection.

Creates a composite field for date selection. Note that the $input attribute is an array of fields (day, month & year). Example:

  1. $date = new DateField('DOB');
  2. $date->out();




Tags:

author:  Dumitru Postoronca


[ Top ]


Class Methods


constructor DateField [line 371]

DateField DateField( string $name, [string $label = 'Date: '])

Constructor

Constructor




Parameters:

string   $name   Name of the field
string   $label   Label of the field

[ Top ]

method out [line 410]

void out( )

Outputs the field in XHTML format

Outputs the field in XHTML format




Overrides Field::out() (Outputs the field in XHTML format)

[ Top ]

method setDate [line 398]

void setDate( array $date)

Sets the field's date.

Sets the field's date. Example of usage using a mySQL database:

  1. $date = explode("-", $model->last_login);
  2. $dateField->setDate($date);




Parameters:

array   $date   Array that represents a date element. $date[0] represents the year, $date[1] is the month and $date[2] is the day you wish to set

[ Top ]


Documentation generated on Fri, 16 Dec 2005 13:16:37 +0200 by phpDocumentor 1.3.0RC4