org.seanmonahan
[ class tree: org.seanmonahan ] [ index: org.seanmonahan ] [ all elements ]

Class: Form

Source Location: /Form.class.php

Class Overview


This class creates HTML form using only PHP code.


Author(s):

  • Sean Monahan

Version:

  • 1.0

Copyright:

  • 2008 Sean Monahan

Methods



Class Details

[line 17]
This class creates HTML form using only PHP code.

PHP Version 5

LICENSE: This source file is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License. http://creativecommons.org/licenses/by-sa/3.0/us/




Tags:

author:  Sean Monahan
version:  1.0
copyright:  2008 Sean Monahan


[ Top ]


Class Methods


constructor __construct [line 61]

Form __construct( [string $name = ""], [string $method = "post"], [string $action = null])

This class builds an HTML form.



Tags:

access:  public


Parameters:

string   $name   The name of the form.
string   $method   The method used to submit the form.
string   $action   The script used to process the form.

[ Top ]

method action [line 96]

string action( )

Getter for $_action.



Tags:

return:  The script to submit the form to.
access:  public


[ Top ]

method addEventListener [line 151]

void addEventListener( string $event, string $listener)

Adds an event listeners to the form.



Tags:

access:  public


Parameters:

string   $event   The event to listen for.
string   $listener   The function to execute.

[ Top ]

method addField [line 140]

void addField( FormField $field)

Adds a FromField to the list of fields.



Tags:

access:  public


Parameters:

FormField   $field   A FormField object to be added to the list of fields.

[ Top ]

method buildForm [line 184]

void buildForm( string $form)

Builds the form.



Tags:

access:  public


Parameters:

string   $form   The HTML form.

[ Top ]

method method [line 86]

string method( )

Getter for $_method.



Tags:

return:  The method used to submit the form.
access:  public


[ Top ]

method name [line 76]

string name( )

Getter for $_name.



Tags:

return:  The name of the form.
access:  public


[ Top ]

method printForm [line 162]

void printForm( )

Prints the form.



Tags:

access:  public


[ Top ]

method setAction [line 130]

void setAction( string $action)

Setter for $_action.



Tags:

access:  public


Parameters:

string   $action   The action to use.

[ Top ]

method setMethod [line 116]

void setMethod( string $method)

Setter for $_method.



Tags:

access:  public


Parameters:

string   $method   The method to use.

[ Top ]

method setName [line 106]

void setName( string $name)

Setter for $_name



Tags:

access:  public


Parameters:

string   $name   The name to set.

[ Top ]


Documentation generated on Mon, 15 Dec 2008 21:14:23 -0700 by phpDocumentor 1.4.1