Class Interface

Interface
Direct Known Subclasses:
LocalInterface

public class Interface

Interface Parent Class The interface class contains all the methods required to handle user input from the web interface and handles any specialized handling of the display for these requests. Child classes often override the stub methods for data handling and internal block parsing.


Field Summary
private  unknown $command
           
private  unknown $interface
           
private  unknown $session
           
private  unknown $theme
           
 
Constructor Summary
Interface()
          Interface Constructor The class constructor requires the input of an interface, operation and plugin name.
 
Method Summary
 unknown add()
          Add Stub Method
 unknown CoreErrorHandler(var $errno, var $errstr, var $errfile, var $errline, var $vars)
          Custom Error Handler Rather than rely on defauly PHP error handling, we will override the error handler with our own method.
 unknown delete()
          Delete Stub Method
 unknown display()
          Display Interface The display method calls upon the theme object to perform parsing of the various areas of the template and return the completely parsed text from the template display method.
 unknown edit()
          Edit Stub Method
 unknown footer(var $template)
          Footer Stub Method
 unknown header(var $template)
          Header Stub Method
 unknown Initialize()
          Class Initializer The initializer performs a number of key tasks that are crucial to the setup of the interface.
 unknown leftblock(var $template)
          LeftBlock Stub Method
 unknown main(var $template)
          Main Stub Method
 unknown resetTheme()
          Reset Theme
 unknown rightblock(var $template)
          RightBlock Stub Method
 unknown search()
          Search Stub Method The following is a sample base operations method.
 unknown unknownError()
          Unknown Error A fallback method for displaying an error when a particular operation fails because of odd reasons.
 unknown validateForm()
          Validate HTML Form
 

Field Detail

$interface

private unknown $interface

$theme

private unknown $theme

$session

private unknown $session

$command

private unknown $command
Constructor Detail

Interface

public Interface()
Interface Constructor The class constructor requires the input of an interface, operation and plugin name. Without these elements, the system will only build the default interface which contains no inherent functionality. These core elements are used during initialization to create the proper template and theme elements.
Parameters:
global - String $interface The interface name or description which is cross referenced to blocks in the database.
global - String $operation The current operation being performed (blank by default).
global - String $plugin The name of the current plugin being used for DB cross references.
global - String $interface_title A title most often used to name the page in the browser title.
Method Detail

Initialize

public unknown Initialize()
Class Initializer The initializer performs a number of key tasks that are crucial to the setup of the interface. These methods are set here due to an issue in PHP in which the object cannot cross-reference itself in other object constructors during instantiation. Each child interface may define its own initializeLocal method, but should never override the parent method.
See Also:
initializeLocal

resetTheme

public unknown resetTheme()
Reset Theme

display

public unknown display()
Display Interface The display method calls upon the theme object to perform parsing of the various areas of the template and return the completely parsed text from the template display method.

main

public unknown main(var $template)
Main Stub Method
Parameters:
$template - is passed by reference

header

public unknown header(var $template)
Header Stub Method
Parameters:
$template - is passed by reference

leftblock

public unknown leftblock(var $template)
LeftBlock Stub Method
Parameters:
$template - is passed by reference

rightblock

public unknown rightblock(var $template)
RightBlock Stub Method
Parameters:
$template - is passed by reference

footer

public unknown footer(var $template)
Footer Stub Method
Parameters:
$template - is passed by reference

search

public unknown search()
Search Stub Method The following is a sample base operations method. As you can see, it is very simple. Base operation methods allow the Interface to display forms or screens which contain data based on a selected operation. These differ from submission methods which must perform some task on the user's data. The base method only loads the interface data and sets the operation. The theme class will load the operation blocks and parse the assigned data into the display.

add

public unknown add()
Add Stub Method

edit

public unknown edit()
Edit Stub Method

delete

public unknown delete()
Delete Stub Method

unknownError

public unknown unknownError()
Unknown Error A fallback method for displaying an error when a particular operation fails because of odd reasons. The typical use of this method is to catch operation calls that are not implemented. This may happen if a user attempts to submit a query on the interface using a method entered manually. This might otherwise be considered "hacking" on the Interface.

validateForm

public unknown validateForm()
Validate HTML Form

CoreErrorHandler

public unknown CoreErrorHandler(var $errno,
                                var $errstr,
                                var $errfile,
                                var $errline,
                                var $vars)
Custom Error Handler Rather than rely on defauly PHP error handling, we will override the error handler with our own method. Eventually, this error handler will write to its own log file (not the DB) and generate proper error messages for display in the interfaces.
Parameters:
integer - $errno A masked value of the error number.
String - $errstr A string describing the error condition.
String - $errfile The filename in which the error occured.
integer - $errline The line number of the program in which the error occurred.
Array - $vars An array containing the variables which were set during the error condition.
Returns:
VOID