Pines Development

3.4. Core Functions

Pines Core includes several functions. Most of these functions are just shortcuts to common methods of the Pines object and system services.

Table 3.9. Core Functions

FunctionDescription
clean_checkboxClean the name of a checkbox to use in an HTML form.
clean_filenameClean a filename, so it doesn't refer to any parent directories.
format_contentShortcut to $pines->format_content().
format_dateShortcut to $pines->format_date().
format_date_rangeShortcut to $pines->format_date_range().
format_fuzzy_timeShortcut to $pines->format_fuzzy_time().
format_phoneShortcut to $pines->format_phone().
gatekeeperShortcut to $pines->user_manager->gatekeeper(). If no user manager is installed, gatekeeper returns true.
is_clean_filenameCheck whether a filename refers to any parent directories.
pines_actionShortcut to $pines->action().
pines_dependShortcut to $pines->depend->check().
pines_errorShortcut to $pines->page->error().
pines_logShortcut to $pines->log_manager->log(). If no log manager is installed, pines_log returns true.
pines_noticeShortcut to $pines->page->notice().
pines_redirectShortcut to $pines->redirect().
pines_sessionShortcut to $pines->session().
pines_urlShortcut to $pines->template->url(). If there is no current template, pines_url returns null.
punt_userShortcut to $pines->user_manager->punt_user(). If no user manager is installed punt_user redirects the user to the homepage.