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

Class: FormInput

Source Location: /FormInput.class.php

Class Overview

FormField
   |
   --FormInput

The FormField class.


Author(s):

  • Sean Monahan

Version:

  • 1.0

Copyright:

  • 2008 Sean Monahan

Methods


Inherited Methods

Class: FormField

FormField::__construct()
This is the base class for all HTML form fields.
FormField::addClassName()
Adds a class name to the existing list of classes.
FormField::addEventListener()
Adds an event listeners to the field.
FormField::className()
Getter for $_action.
FormField::eventListeners()
Getter for $_eventListeners.
FormField::fieldType()
Getter for $_fieldType;
FormField::isDisabled()
Getter for $_isDisabled.
FormField::label()
Getter for $_method.
FormField::name()
Getter for $_name.
FormField::setClassName()
Setter for $_className.
FormField::setFieldType()
Setter for $_fieldType.
FormField::setIsDisabled()
Setter for $_isDisabled.
FormField::setLabel()
Setter for $_label.
FormField::setName()
Setter for $_name
FormField::setSize()
Setter for $_size.
FormField::size()
Getter for $_size.
FormField::type()
Getter for $_type.

Class Details

[line 18]
The FormField class.

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 99]

FormInput __construct( [string $value = ""], [string $type = "text"], [string $name = ""], [string $label = ""], [string $className = ""], [string $image = null], [bool $stylePad = false])

This class builds an HTML <input>.



Tags:

access:  public


Overrides FormField::__construct() (This is the base class for all HTML form fields.)

Parameters:

string   $value   The value for the <input>.
string   $type   The type for the <input>.
string   $name   The name for the <input>.
string   $label   The label for the <input>.
string   $className   The CSS class for the <input>.
string   $image   The image to use for the <input>.
bool   $stylePad   Add <div>'s so the <input> can be styled with fancy rounded edges and such.

[ Top ]

method accept [line 149]

string accept( )

Getter for $_accept.



Tags:

return:  The list of acceptable mime-types.
access:  public


[ Top ]

method checked [line 139]

bool checked( )

Getter for $_checked.



Tags:

return:  Whether the input is checked or not.
access:  public


[ Top ]

method image [line 179]

string image( )

Getter for $_image.



Tags:

return:  The path to the image that will be used by the input.
access:  public


[ Top ]

method maxLength [line 159]

string maxLength( )

Getter for $_maxLength.



Tags:

return:  The maximum length allowed for the input.
access:  public


[ Top ]

method readOnly [line 169]

bool readOnly( )

Getter for $_readOnly.



Tags:

return:  Whether the input is read-only or not.
access:  public


[ Top ]

method setAccept [line 240]

void setAccept( string $value)

Setter for $_accept.



Tags:

access:  public


Parameters:

string   $value   The list of allowed mime-types.

[ Top ]

method setChecked [line 227]

void setChecked( string $value)

Setter for $_checked.



Tags:

access:  public


Parameters:

string   $value   Set the radio or check box to be selected.

[ Top ]

method setImage [line 299]

void setImage( $value, string $image)

Setter for $_image.



Tags:

access:  public


Parameters:

string   $image   The path to the image.
   $value  

[ Top ]

method setMaxLength [line 253]

void setMaxLength( int $value)

Setter for $_maxLength.



Tags:

access:  public


Parameters:

int   $value   The length allowed for the input field.

[ Top ]

method setReadOnly [line 270]

void setReadOnly( bool $value)

Setter for $_readOnly.



Tags:

access:  public


Parameters:

bool   $value   True to set the field to read only.

[ Top ]

method setSize [line 283]

void setSize( int $value)

Setter for $_size.



Tags:

access:  public


Overrides FormField::setSize() (Setter for $_size.)

Parameters:

int   $value   The size.

[ Top ]

method setStylePad [line 312]

void setStylePad( bool $value)

Setter for $_stylePad.



Tags:

access:  public


Parameters:

bool   $value   The value for style pad.

[ Top ]

method setType [line 201]

void setType( string $type)

Setter for $_type



Tags:

access:  public


Parameters:

string   $type   The type for the input field. Only "text", "hidden", "button" and "submit" are allowed.

[ Top ]

method setValue [line 217]

void setValue( string $value)

Setter for $_value;



Tags:

access:  public


Parameters:

string   $value   The contents for $_value.

[ Top ]

method stylePad [line 189]

bool stylePad( )

Getter for $_stylePad.



Tags:

return:  Whether style padding is enabled or not.
access:  public


[ Top ]

method type [line 119]

string type( )

Getter for $_type.



Tags:

return:  The type of input.
access:  public


Overrides FormField::type() (Getter for $_type.)

[ Top ]

method value [line 129]

string value( )

Getter for $_value.



Tags:

return:  The value of the input.
access:  public


[ Top ]


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