Model API

PageKit Extensions

pkit_dbi_connect - Should generate and return DBI database handler, $dbh, which can be accessed by rest of Model using the dbh method.
pkit_on_error - Can be used to catch any fatal error condition.
pkit_session_setup - Returns Session setup arguments.
pkit_auth_credential - Verifies login credentials and returns session key
pkit_auth_session_key - Verifies a session key and returns the user ID and session ID
pkit_common_code - Code common across site.
pkit_post_common_code - Code common across site, executed after rest of code.
pkit_cleanup_code - Cleanup code at the end of request.
pkit_fixup_uri - filter uri for conversion into page IDs
pkit_get_config_attr - Returns the value of the attr you ask for.
pkit_get_default_page - Returns "index" page when no page_id is specified.
pkit_merge_sessions - Merges current session with session associated with login when user first logs in.
pkit_output_filter - Filters output generated by PageKit
pkit_startup - Class method called at server startup.
pkit_default - Default class method

These methods should be defined in your base module as defined by model_base_class in Config/Config.xml.

PageKit API

input - Get request parameters
pkit_send - Can be used to send data to the client.
pkit_component_params_hashref - Get access to the component parameters.
pkit_input_hashref - Gets all request paramaters.
fillinform - Fills in HTML Forms
ignore_fillinform_fields - Fills in HTML Forms
pnotes - Pass values from one method/handler to another
output_convert - Outputs data for display, converting charset.
output - Outputs data for display.
pkit_query - Wrapper to HTML::Template::query
apr - Returns Apache::Request object
pkit_status_code - Get or set the status code for you page.
dbh - Returns database handle
session - Gets session object
page_session - Gets page session object
pkit_message - Adds message to PKIT_MESSAGES tag
pkit_gettext_message - Adds translated message to PKIT_MESSAGES tag
pkit_gettext - Translates the text to the clients language if possible else return the messages as it was before.
pkit_internal_execute_redirect - Internal redirection to another page inside the PageKit application. Also execute the code for the new destination page.
pkit_internal_redirect - Internal redirection to another page inside the PageKit application
pkit_redirect - Redirect to another URL.
pkit_set_errorfont - Sets PKIT_ERRORSPAN tags
pkit_set_errorspan - Sets PKIT_ERRORSPAN tags
pkit_validate_input - Validates input from an HTML form.
pkit_get_orig_uri - Gets the original URI requested.
pkit_get_page_id - Gets the page ID.
pkit_get_server_id - Gets server ID.
pkit_get_session_id - Gets the session id
pkit_get_page_session_id - Gets the page session id or undef in case this page has no page_session requested.
pkit_lang - Gets Language preference of user
pkit_root - Gets PageKit root directory
pkit_user - Gets user ID of authenticated user.

Theese methods are available to the user as Apache::PageKit::Model API.