CORE POS - Fannie
The CORE POS back end
|
Public Member Functions | |
readRoutes () | |
addRoute () | |
preprocess () | |
bodyContent () | |
unitTest ($phpunit) | |
setForm (COREPOS\common\mvc\ValueContainer $f) | |
Public Member Functions inherited from FanniePage | |
preprocess () | |
getHeader () | |
addBootstrap () | |
addJQuery () | |
get_header () | |
getFooter () | |
get_footer () | |
loginRedirect () | |
login_redirect () | |
checkAuth () | |
check_auth () | |
helpContent () | |
preFlight () | |
postFlight () | |
setPermissions ($p) | |
Protected Member Functions | |
checkRoute ($route, $try_routes) | |
bestRoute ($try_routes) | |
unknownRequestHandler () | |
unknownRequestView () | |
getModel ($database_connection, $class, $params, $find=False) | |
get_model ($database_connection, $class, $params, $find=False) | |
Protected Member Functions inherited from FanniePage | |
lineaJS () | |
helpModal () | |
Protected Attributes | |
$__method = '' | |
$__models = array() | |
$__routes | |
$__route_stem = 'unknownRequest' | |
$form | |
$routing_trait | |
Protected Attributes inherited from FanniePage | |
$must_authenticate = false | |
$current_user = false | |
$auth_classes = array() | |
$title = 'Page window title' | |
$header = 'Page displayed header' | |
$enable_linea = false | |
Additional Inherited Members | |
Public Attributes inherited from FanniePage | |
$themed = true | |
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
FannieRESTfulPage::setForm | ( | COREPOS\common\mvc\ValueContainer | $f | ) |
Set the form value container
[ValueContainer] | $f Accepts a generic ValueContainer instead of a FormValueContainer so that unit tests can inject preset values |
|
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