Download Full Paper

Transcript
CHAPTER 5. ARCHITECTURE
• function menuimage
menuimage($app, $name)
Abstract: Generate an HTML image tag with a description.
Parameter (1) $app: String containing the name of the application that contains
the image.
Parameter (2) $name: String containing the name of the image (also used for a
description of the image).
Result: String with the HTML image tag.
• function imagelink
imagelink($app, $name, $url, $params)
Abstract: Generate a link image whose link points to the given URL.
Description: Shortcut for the combined usage of menuimage() and link()
Parameter (1) $app: String containing the name of the application where the image
can be found.
Parameter (2) $name: String containing the name of the image.
Parameter (3) $url: URL within the testbed.
Parameter (4) $params: Parameters of the URL.
Result: String with the HTML image link to the specified URL.
Class db
Abstract: This is the database class whose instances solely communicate with the
testbed’s ProstgreSQL database.
Description: This class can be replaced by a class that can operate with other databases
like MySQL by providing the same interface as this class.
File: common/inc/class.db.inc.php
• function db
db($settings = ’’)
Abstract: Constructor of the class.
Parameter (1) $settings: Settings how to connect to the database. These settings
typically stem from the user or the global configuration file.
• function connect
connect()
Abstract: Connect to the database.
• function to timestamp
to_timestamp($epoch)
Abstract: Convert a date to the format the database requires for dates.
Parameter (1) $epoch: Contains the date to convert.
Result: String with the correspondig database date format
254