Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

formcontrols/controls.php File Reference


Detailed Description

This file contains definitions for control objects.

Additionally some constants and utility functions are defined.

Definition in file controls.php.

Go to the source code of this file.

Classes

class  CheckboxChoice
 A list of checkboxes. More...

class  CheckboxInput
 A checkbox input. More...

class  CheckedInput
 An input representing a control that can be 'checked'. More...

class  ClickedInput
 A ValueInput that can be clicked. More...

class  ControlChoice
 A ControlContainer that acts as a ControlElement. More...

class  ControlContainer
 A container for controls. More...

class  ControlElement
 A XHTML form control. More...

class  EnhancedImageInput
 An enhanced image input. More...

class  FileInput
 A file input. More...

class  HiddenInput
 An input control of type hidden. More...

class  ImageInput
 An image input. More...

class  Input
 A form control representing an input element. More...

class  MultipleChoice
 A ControlChoice that allows the selection of multiple options. More...

class  MultipleOption
 An option that can be selected along with other options. More...

class  MultipleSelect
 A combo box. More...

class  Option
 An option element. More...

class  PasswordInput
 An input control of type password. More...

class  RadioChoice
 A list of radio buttons. More...

class  RadioInput
 A radio button. More...

class  ResetInput
 A reset button. More...

class  SelectElement
 A single XHTML control which can support a choice of options. More...

class  SingleChoice
 A ControlChoice that only allows the selection of one option at a time. More...

class  SingleOption
 An option that cannot be selected along with other options. More...

class  SingleSelect
 A drop-down list. More...

class  SubmitInput
 A submit button. More...

class  TextArea
 A textarea form control. More...

class  TextInput
 A input control of type text. More...

class  ValueInput
 A form control representing an input element with a value. More...

class  XHTMLElement
 A XHTML conformant XML element. More...


Enumerations

enum  FC_EVENT_UPDATE
 Specifies that a control can be updated. More...

enum  FC_EVENT_CLICK
 Specifies that a control can be clicked. More...

enum  FC_EVENT_SELECT
 Specifies that a control can be selected. More...

enum  FC_EVENT_DESELECT
 Specifies that a control can be deselected. More...


Functions

 gen_control_name ($as_array=false)
 Generate an unique control name.

 is_valid_control_name ($name, $multiple=false)
 Check whether a string is a valid control name.

 is_subclass ($child, $parent)
 Check whether one class name is derived from another.

 check_class ($unknown, $base)
 Check the validity of a class and it's inheritance.


Enumeration Type Documentation

enum FC_EVENT_CLICK
 

Specifies that a control can be clicked.

Definition at line 14 of file controls.php.

Referenced by ClickedInput::_processPOSTED(), ClickedInput::clicked(), and ClickedInput::ClickedInput().

enum FC_EVENT_DESELECT
 

Specifies that a control can be deselected.

Definition at line 18 of file controls.php.

Referenced by CheckedInput::CheckedInput(), CheckedInput::deselect(), Option::deselect(), Option::Option(), CheckedInput::select(), and Option::select().

enum FC_EVENT_SELECT
 

Specifies that a control can be selected.

Definition at line 16 of file controls.php.

Referenced by CheckedInput::CheckedInput(), CheckedInput::deselect(), Option::deselect(), Option::Option(), CheckedInput::select(), and Option::select().

enum FC_EVENT_UPDATE
 

Specifies that a control can be updated.

Definition at line 12 of file controls.php.

Referenced by ControlChoice::ControlChoice(), ControlElement::ControlElement(), SelectElement::eventHasOccurred(), ControlChoice::eventHasOccurred(), ControlElement::setUpdated(), ControlChoice::updated(), and ControlElement::updated().


Function Documentation

check_class unknown,
base
 

Check the validity of a class and it's inheritance.

Assumes the client code needs the class to exist and triggers an error if it has not been declared. Also triggers an error if the class is not derived from the specified base class.

Parameters:
$unknown the name of a class to check
$base the name of a class from which the class being checked should be derived
Returns:
void

Definition at line 81 of file controls.php.

References is_subclass().

Referenced by CheckboxChoice::CheckboxChoice(), and RadioChoice::RadioChoice().

gen_control_name as_array = false  ) 
 

Generate an unique control name.

Controls need unique names/ids that don't confict with each other. These are used for identifying a particular element and are used as a control's HTML form name as well.

Parameters:
$as_array the control can contain multiple values. The returned name ensures that when it is submitted in a HTML form, PHP is associates multiple form entries with this one POST name.
Returns:
the unique name

Definition at line 29 of file controls.php.

Referenced by ControlChoice::ControlChoice(), and ControlElement::ControlElement().

is_subclass child,
parent
 

Check whether one class name is derived from another.

Parameters:
$child the child class name
$parent the parent class name
Returns:
true if the child is derived from the parent, false otherwise

Definition at line 58 of file controls.php.

Referenced by check_class().

is_valid_control_name name,
multiple = false
 

Check whether a string is a valid control name.

Parameters:
$name a potential control name
$multiple the control can contain multiple values
Returns:
true if the name is valid, false otherwise

Definition at line 44 of file controls.php.

Referenced by ControlChoice::checkControlName(), and ControlElement::checkControlName().


Generated on Mon Feb 14 11:39:50 2005 for FormControls by doxygen 1.3.5