CORE POS - Fannie
The CORE POS back end
|
Public Member Functions | |
readRoutes () | |
preprocess () | |
bodyContent () | |
unitTest ($phpunit) | |
Protected Member Functions | |
unknownRequestHandler () | |
unknownRequestView () | |
getModel ($database_connection, $class, $params, $find=False) | |
get_model ($database_connection, $class, $params, $find=False) | |
Protected Attributes | |
$__method = '' | |
$__models = array() | |
$__routes | |
$__route_stem = 'unknownRequest' | |
A variation on the standard FanniePage using REST principles.
Four methods are available for processing user input and are automatically called based on HTTP request type:
Eight methods are available for displaying the page and are also automatically called based on request type:
A class does not need to implement handlers or views for all request types. Use as few or as many as needed.
PUT and DELETE are simulated by setting a form field named "_method".
|
protected |
Load model(s)
$database_connection | SQLManager object |
$class | string name of model class |
$params | array of column names and values |
$find | [optional] string sort column or False |
If called without $find or $find=False returns a single model object. Provided $params must be sufficient to uniquely identify a single record
If called with $find then returns an array of model objects for all records that match $params and sorted by $find.
FannieRESTfulPage::readRoutes | ( | ) |
Parse request info and determine which route to use
|
protected |
Process unknown HTTP method request
|
protected |
Draw default page for unknown HTTP method
|
protected |
Define available routes Syntax is request method followed by parameter names in angle brackets
method<one><two> should provide a controller function named method_one_twoHandler(). It may optionally provide a view function named method_one_twoView().
controller functions behave like FanniePage::preprocess and should return True or False.
view functions behave like FanniePage::body_content and should return an HTML string