OS Class Reference

Abstraction for operating systems. More...

List of all members.

Public Member Functions

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

Private Member Functions

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

Private Attributes

 $fields = array()
 $versions = null
 $exists = null


Detailed Description

Abstraction for operating systems.

This class is an abstraction layer for the os and version table in the MySQL database.


Member Function Documentation

OS::OS ( id  ) 

Class constructor.

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

OS::fillWithPost (  ) 

Fill in the operating system using HTTP POST.

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

Returns:
Always returns true.

OS::fillWithDatabase (  ) 

Fill in the operating system using the database.

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

See also:
Database

OS::fill ( array  )  [private]

Fill the operating system using values from an array.

This fill fill in the operating system looking for key/values inside an array, and create it's VersionList.

See also:
Field

VersionList

OS::getField ( name  ) 

Get a field.

This function retrieves a Field from the operating system.

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

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

Add a field.

This will add a new field to the operating 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.

OS::exists (  ) 

Checks if the operating system already exists.

Returns true if the operating system already exists in the database.

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

OS::save ( overwrite  ) 

Save the operating system in the database.

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

See also:
Database

OS::delete (  ) 

Remove the operating system from the database.

This function will DELETE the operating system from the database.

Returns:
Always boolean true.
See also:
Database

OS::html (  ) 

Output the operating system as an HTML form.

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


Member Data Documentation

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

OS::$versions = null [private]

OS::$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