System Class Reference

Abstraction for systems. More...

List of all members.

Public Member Functions

 System ($id)
 Class constructor.
 fillWithPost ()
 Fill in the system using HTTP POST.
 fillWithDatabase ()
 Fill in the system using the database.
 getField ($name)
 Get a field.
 addField ($name, $description, $type, $value="", $width="20")
 Add a field.
 exists ()
 Checks if the System already exists.
 save ($overwrite)
 Save the system in the database.
 delete ()
 Remove the system from the database.
 html ()
 Output the system as an HTML form.

Private Member Functions

 fill ($array)
 Fill the System using values from an array.

Private Attributes

 $fields = array()
 $exists = null


Detailed Description

Abstraction for systems.

This class is an abstraction layer for the system table in the MySQL database.


Member Function Documentation

System::System ( id  ) 

Class constructor.

Parameters:
id The id number of the system. This can be null for new systems.

System::fillWithPost (  ) 

Fill in the system using HTTP POST.

This function will fill in the System using variables from $_POST.

Returns:
Always returns true.

System::fillWithDatabase (  ) 

Fill in the system using the database.

This function will fill in all fields using data from the database.

See also:
Database

System::fill ( array  )  [private]

Fill the System using values from an array.

This fill fill in the System looking for key/values inside an array, and create ComboBoxes where appropriate.

See also:
Field

ComboBox

System::getField ( name  ) 

Get a field.

This function retrieves a Field from the system.

Parameters:
name The name of the field.
See also:
Field

System::addField ( name,
description,
type,
value = "",
width = "20" 
)

Add a field.

This will add a new field to the system.

Parameters:
name The name of the field.
description A descriptive text for the field.
type The HTML type of the field.
value Initial value of the field.
width The width the field will have in HTML.

System::exists (  ) 

Checks if the System already exists.

Returns true if the System already exists in the database.

Returns:
boolean true or false indicating if the system already exists.

System::save ( overwrite  ) 

Save the system in the database.

This will either INSERT or UPDATE the system in the database.

See also:
Database

System::delete (  ) 

Remove the system from the database.

This function will DELETE the system from the database.

Returns:
Always boolean true.
See also:
Database

System::html (  ) 

Output the system as an HTML form.

This function will output the system as HTML form attributes, inside a Table.


Member Data Documentation

System::$fields = array() [private]

System::$exists = null [private]


The documentation for this class was generated from the following file:
Generated on Sun Oct 21 06:49:25 2007 for phpSystemManager by  doxygen 1.5.2