CWIS Developer Documentation
|
Top-level framework for web applications. More...
Application Framework | |
const | LOGLVL_TRACE = 6 |
TRACE error logging level. | |
const | LOGLVL_DEBUG = 5 |
DEBUG error logging leve. | |
const | LOGLVL_INFO = 4 |
INFO error logging level. | |
const | LOGLVL_WARNING = 3 |
WARNING error logging level. | |
const | LOGLVL_ERROR = 2 |
ERROR error logging level. | |
const | LOGLVL_FATAL = 1 |
FATAL error logging level. | |
AddObjectDirectories ($Dirs) | |
Add additional directories to be searched for object files when autoloading. | |
AddImageDirectories ($Dir, $SearchLast=FALSE, $SkipSlashCheck=FALSE) | |
Add additional directory(s) to be searched for image files. | |
AddIncludeDirectories ($Dir, $SearchLast=FALSE, $SkipSlashCheck=FALSE) | |
Add additional directory(s) to be searched for user interface include (CSS, JavaScript, common PHP, common HTML, etc) files. | |
AddInterfaceDirectories ($Dir, $SearchLast=FALSE, $SkipSlashCheck=FALSE) | |
Add additional directory(s) to be searched for user interface (HTML/TPL) files. | |
AddFunctionDirectories ($Dir, $SearchLast=FALSE, $SkipSlashCheck=FALSE) | |
Add additional directory(s) to be searched for function ("F-") files. | |
SetBrowserDetectionFunc ($DetectionFunc) | |
Specify function to use to detect the web browser type. | |
AddUnbufferedCallback ($Callback, $Parameters=array()) | |
Add a callback that will not be executed after buffered content has been output and that won't have its output buffered. | |
TemplateLocationCacheExpirationInterval ($NewInterval=-1) | |
Get/set UI template location cache expiration period in minutes. | |
LoadPage ($PageName) | |
Load page PHP and HTML/TPL files. | |
GetPageName () | |
Get name of page being loaded. | |
SetJumpToPage ($Page) | |
Set URL of page to autoload after PHP page file is executed. | |
JumpToPageIsSet () | |
Report whether a page to autoload has been set. | |
HtmlCharset ($NewSetting=NULL) | |
Get/set HTTP character encoding value. | |
SuppressHTMLOutput ($NewSetting=TRUE) | |
Suppress loading of HTML files. | |
ActiveUserInterface ($UIName=NULL) | |
Get/set name of current active user interface. | |
AddPostProcessingCall ($FunctionName, &$Arg1=self::NOVALUE, &$Arg2=self::NOVALUE, &$Arg3=self::NOVALUE, &$Arg4=self::NOVALUE, &$Arg5=self::NOVALUE, &$Arg6=self::NOVALUE, &$Arg7=self::NOVALUE, &$Arg8=self::NOVALUE, &$Arg9=self::NOVALUE) | |
Add function to be called after HTML has been loaded. | |
AddEnvInclude ($FileName) | |
Add file to be included to set up environment. | |
GUIFile ($FileName) | |
Search UI directories for specified image or CSS file and return name of correct file. | |
PUIFile ($FileName) | |
Search UI directories for specified image or CSS file and print name of correct file. | |
RequireUIFile ($FileName) | |
Add file to list of required UI files. | |
LoadFunction ($Callback) | |
Attempt to load code for function or method if not currently available. | |
GetElapsedExecutionTime () | |
Get time elapsed since constructor was called. | |
GetSecondsBeforeTimeout () | |
Get remaining available (PHP) execution time. | |
HtaccessSupport () | |
Determine if .htaccess files are enabled. | |
LogError ($Level, $Msg) | |
Write error message to log. | |
LogMessage ($Level, $Msg) | |
Write status message to log. | |
LoggingLevel ($NewValue=NULL) | |
Get/set logging level. | |
static | SessionLifetime ($NewValue=NULL) |
Get/set session timeout in seconds. | |
Event Handling | |
const | EVENTTYPE_DEFAULT = 1 |
Default event type. | |
const | EVENTTYPE_CHAIN = 2 |
Result chaining event type. | |
const | EVENTTYPE_FIRST = 3 |
First response event type. | |
const | EVENTTYPE_NAMED = 4 |
Named result event type. | |
const | ORDER_FIRST = 1 |
Run hooked function first (i.e. | |
const | ORDER_MIDDLE = 2 |
Run hooked function after ORDER_FIRST and before ORDER_LAST events. | |
const | ORDER_LAST = 3 |
Run hooked function last (i.e. | |
RegisterEvent ($EventsOrEventName, $EventType=NULL) | |
Register one or more events that may be signaled. | |
IsRegisteredEvent ($EventName) | |
Check if event has been registered (is available to be signaled). | |
HookEvent ($EventsOrEventName, $Callback=NULL, $Order=self::ORDER_MIDDLE) | |
Hook one or more functions to be called when the specified event is signaled. | |
SignalEvent ($EventName, $Parameters=NULL) | |
Signal that an event has occured. | |
IsStaticOnlyEvent ($EventName) | |
Report whether specified event only allows static callbacks. | |
Task Management | |
const | PRIORITY_HIGH = 1 |
Highest priority. | |
const | PRIORITY_MEDIUM = 2 |
Medium (default) priority. | |
const | PRIORITY_LOW = 3 |
Lower priority. | |
const | PRIORITY_BACKGROUND = 4 |
Lowest priority. | |
QueueTask ($Callback, $Parameters=NULL, $Priority=self::PRIORITY_MEDIUM, $Description="") | |
Add task to queue. | |
QueueUniqueTask ($Callback, $Parameters=NULL, $Priority=self::PRIORITY_MEDIUM, $Description="") | |
Add task to queue if not already in queue or currently running. | |
TaskIsInQueue ($Callback, $Parameters=NULL) | |
Check if task is already in queue or currently running. | |
GetTaskQueueSize ($Priority=NULL) | |
Retrieve current number of tasks in queue. | |
GetQueuedTaskList ($Count=100, $Offset=0) | |
Retrieve list of tasks currently in queue. | |
GetRunningTaskList ($Count=100, $Offset=0) | |
Retrieve list of tasks currently in queue. | |
GetOrphanedTaskList ($Count=100, $Offset=0) | |
Retrieve list of tasks currently in queue. | |
GetOrphanedTaskCount () | |
Retrieve current number of orphaned tasks. | |
ReQueueOrphanedTask ($TaskId, $NewPriority=NULL) | |
Move orphaned task back into queue. | |
DeleteTask ($TaskId) | |
Remove task from task queues. | |
GetTask ($TaskId) | |
Retrieve task info from queue (either running or queued tasks). | |
TaskExecutionEnabled ($NewValue=NULL) | |
Get/set whether automatic task execution is enabled. | |
MaxTasks ($NewValue=NULL) | |
Get/set maximum number of tasks to have running simultaneously. | |
MaxExecutionTime ($NewValue=NULL) | |
Get/set maximum PHP execution time. | |
FindCommonTemplate ($BaseName) | |
Preserved for backward compatibility for use with code written prior to October 2012. | |
Backward Compatibility | |
const | NOVALUE = ".-+-.NO VALUE PASSED IN FOR ARGUMENT.-+-." |
OnCrash () | |
Called automatically at program termination to ensure output is written out. | |
Top-level framework for web applications.
Definition at line 15 of file ApplicationFramework.php.
ApplicationFramework::ActiveUserInterface | ( | $UIName = NULL | ) |
Get/set name of current active user interface.
Any "SPTUI–" prefix is stripped out for backward compatibility in CWIS.
UIName | Name of new active user interface. (OPTIONAL) |
Definition at line 671 of file ApplicationFramework.php.
ApplicationFramework::AddEnvInclude | ( | $FileName | ) |
Add file to be included to set up environment.
This file is loaded right before the PHP file.
FileName | Name of file to be included. |
Definition at line 717 of file ApplicationFramework.php.
ApplicationFramework::AddFunctionDirectories | ( | $Dir, | |
$SearchLast = FALSE , |
|||
$SkipSlashCheck = FALSE |
|||
) |
Add additional directory(s) to be searched for function ("F-") files.
Specified directory(s) will be searched, in order, before the default directories or any other directories previously specified. If a directory is already present in the list, it will be moved to front to be searched first (or to the end to be searched last, if SearchLast is set). SearchLast only affects whether added directories are searched before or after those currently in the list; when multiple directories are added, they are always searched in the order they appear in the array. The token "%ACTIVEUI%" may be included in the directory names, and will be replaced with the canonical name of the currently active UI when searching for files.
Dir | String with directory or array with directories to be searched. |
SearchLast | If TRUE, the directory(s) are searched after the entries current in the list, instead of before. (OPTIONAL, defaults to FALSE) |
SkipSlashCheck | If TRUE, check for trailing slash will be omitted. (OPTIONAL, defaults to FALSE) |
Definition at line 245 of file ApplicationFramework.php.
ApplicationFramework::AddImageDirectories | ( | $Dir, | |
$SearchLast = FALSE , |
|||
$SkipSlashCheck = FALSE |
|||
) |
Add additional directory(s) to be searched for image files.
Specified directory(s) will be searched, in order, before the default directories or any other directories previously specified. If a directory is already present in the list, it will be moved to front to be searched first (or to the end to be searched last, if SearchLast is set). SearchLast only affects whether added directories are searched before or after those currently in the list; when multiple directories are added, they are always searched in the order they appear in the array. The token "%ACTIVEUI%" may be included in the directory names, and will be replaced with the canonical name of the currently active UI when searching for files.
Dir | String with directory or array with directories to be searched. |
SearchLast | If TRUE, the directory(s) are searched after the entries current in the list, instead of before. (OPTIONAL, defaults to FALSE) |
SkipSlashCheck | If TRUE, check for trailing slash will be omitted. (OPTIONAL, defaults to FALSE) |
Definition at line 166 of file ApplicationFramework.php.
ApplicationFramework::AddIncludeDirectories | ( | $Dir, | |
$SearchLast = FALSE , |
|||
$SkipSlashCheck = FALSE |
|||
) |
Add additional directory(s) to be searched for user interface include (CSS, JavaScript, common PHP, common HTML, etc) files.
Specified directory(s) will be searched, in order, before the default directories or any other directories previously specified. If a directory is already present in the list, it will be moved to front to be searched first (or to the end to be searched last, if SearchLast is set). SearchLast only affects whether added directories are searched before or after those currently in the list; when multiple directories are added, they are always searched in the order they appear in the array. The token "%ACTIVEUI%" may be included in the directory names, and will be replaced with the canonical name of the currently active UI when searching for files.
Dir | String with directory or array with directories to be searched. |
SearchLast | If TRUE, the directory(s) are searched after the entries current in the list, instead of before. (OPTIONAL, defaults to FALSE) |
SkipSlashCheck | If TRUE, check for trailing slash will be omitted. (OPTIONAL, defaults to FALSE) |
Definition at line 193 of file ApplicationFramework.php.
ApplicationFramework::AddInterfaceDirectories | ( | $Dir, | |
$SearchLast = FALSE , |
|||
$SkipSlashCheck = FALSE |
|||
) |
Add additional directory(s) to be searched for user interface (HTML/TPL) files.
Specified directory(s) will be searched, in order, before the default directories or any other directories previously specified. If a directory is already present in the list, it will be moved to front to be searched first (or to the end to be searched last, if SearchLast is set). SearchLast only affects whether added directories are searched before or after those currently in the list; when multiple directories are added, they are always searched in the order they appear in the array. The token "%ACTIVEUI%" may be included in the directory names, and will be replaced with the canonical name of the currently active UI when searching for files.
Dir | String with directory or array with directories to be searched. |
SearchLast | If TRUE, the directory(s) are searched after the entries current in the list, instead of before. (OPTIONAL, defaults to FALSE) |
SkipSlashCheck | If TRUE, check for trailing slash will be omitted. (OPTIONAL, defaults to FALSE) |
Definition at line 219 of file ApplicationFramework.php.
ApplicationFramework::AddObjectDirectories | ( | $Dirs | ) |
Add additional directories to be searched for object files when autoloading.
Dirs | Array with directories to be searched, with directory paths as indexes and any prefixes to strip (e.g. "Axis–") as values.. |
Definition at line 131 of file ApplicationFramework.php.
ApplicationFramework::AddPostProcessingCall | ( | $FunctionName, | |
& | $Arg1 = self::NOVALUE , |
||
& | $Arg2 = self::NOVALUE , |
||
& | $Arg3 = self::NOVALUE , |
||
& | $Arg4 = self::NOVALUE , |
||
& | $Arg5 = self::NOVALUE , |
||
& | $Arg6 = self::NOVALUE , |
||
& | $Arg7 = self::NOVALUE , |
||
& | $Arg8 = self::NOVALUE , |
||
& | $Arg9 = self::NOVALUE |
||
) |
Add function to be called after HTML has been loaded.
The arguments are optional and are saved as references so that any changes to their value that occured while loading the HTML will be recognized.
FunctionName | Name of function to be called. |
Arg1 | First argument to be passed to function. (OPTIONAL, REFERENCE) |
Arg2 | Second argument to be passed to function. (OPTIONAL, REFERENCE) |
Arg3 | Third argument to be passed to function. (OPTIONAL, REFERENCE) |
Arg4 | Fourth argument to be passed to function. (OPTIONAL, REFERENCE) |
Arg5 | FifthFirst argument to be passed to function. (OPTIONAL, REFERENCE) |
Arg6 | Sixth argument to be passed to function. (OPTIONAL, REFERENCE) |
Arg7 | Seventh argument to be passed to function. (OPTIONAL, REFERENCE) |
Arg8 | Eighth argument to be passed to function. (OPTIONAL, REFERENCE) |
Arg9 | Ninth argument to be passed to function. (OPTIONAL, REFERENCE) |
Definition at line 695 of file ApplicationFramework.php.
ApplicationFramework::AddUnbufferedCallback | ( | $Callback, | |
$Parameters = array() |
|||
) |
Add a callback that will not be executed after buffered content has been output and that won't have its output buffered.
$Callback | callback |
$Parameters | optional callback parameters in an array |
Definition at line 268 of file ApplicationFramework.php.
ApplicationFramework::DeleteTask | ( | $TaskId | ) |
Remove task from task queues.
TaskId | Task ID. |
Definition at line 1457 of file ApplicationFramework.php.
ApplicationFramework::FindCommonTemplate | ( | $BaseName | ) |
Preserved for backward compatibility for use with code written prior to October 2012.
Definition at line 1578 of file ApplicationFramework.php.
ApplicationFramework::GetElapsedExecutionTime | ( | ) |
Get time elapsed since constructor was called.
Definition at line 827 of file ApplicationFramework.php.
Referenced by GetSecondsBeforeTimeout().
ApplicationFramework::GetOrphanedTaskCount | ( | ) |
Retrieve current number of orphaned tasks.
Definition at line 1422 of file ApplicationFramework.php.
ApplicationFramework::GetOrphanedTaskList | ( | $Count = 100 , |
|
$Offset = 0 |
|||
) |
Retrieve list of tasks currently in queue.
Count | Number to retrieve. (OPTIONAL, defaults to 100) |
Offset | Offset into queue to start retrieval. (OPTIONAL) |
Definition at line 1410 of file ApplicationFramework.php.
ApplicationFramework::GetPageName | ( | ) |
Get name of page being loaded.
The page name will not include an extension. This call is only meaningful once LoadPage() has been called.
Definition at line 601 of file ApplicationFramework.php.
ApplicationFramework::GetQueuedTaskList | ( | $Count = 100 , |
|
$Offset = 0 |
|||
) |
Retrieve list of tasks currently in queue.
Count | Number to retrieve. (OPTIONAL, defaults to 100) |
Offset | Offset into queue to start retrieval. (OPTIONAL) |
Definition at line 1382 of file ApplicationFramework.php.
ApplicationFramework::GetRunningTaskList | ( | $Count = 100 , |
|
$Offset = 0 |
|||
) |
Retrieve list of tasks currently in queue.
Count | Number to retrieve. (OPTIONAL, defaults to 100) |
Offset | Offset into queue to start retrieval. (OPTIONAL) |
Definition at line 1395 of file ApplicationFramework.php.
ApplicationFramework::GetSecondsBeforeTimeout | ( | ) |
Get remaining available (PHP) execution time.
Definition at line 836 of file ApplicationFramework.php.
References GetElapsedExecutionTime().
ApplicationFramework::GetTask | ( | $TaskId | ) |
Retrieve task info from queue (either running or queued tasks).
TaskId | Task ID. |
Definition at line 1470 of file ApplicationFramework.php.
ApplicationFramework::GetTaskQueueSize | ( | $Priority = NULL | ) |
Retrieve current number of tasks in queue.
Priority | of tasks. (OPTIONAL, defaults to all priorities) |
Definition at line 1368 of file ApplicationFramework.php.
ApplicationFramework::GUIFile | ( | $FileName | ) |
Search UI directories for specified image or CSS file and return name of correct file.
FileName | Base file name. |
Definition at line 728 of file ApplicationFramework.php.
Referenced by LoadPage(), and PUIFile().
ApplicationFramework::HookEvent | ( | $EventsOrEventName, | |
$Callback = NULL , |
|||
$Order = self::ORDER_MIDDLE |
|||
) |
Hook one or more functions to be called when the specified event is signaled.
The callback parameter is of the PHP type "callback", which allows object methods to be passed.
EventsOrEventName | Name of the event to hook. To hook multiple events, this may also be an array, with the event names as the index and the callbacks as the values. |
Callback | Function to be called when event is signaled. (OPTIONAL if EventsOrEventName is an array of events) |
Order | Preference for when function should be called, primarily for CHAIN and FIRST events. (OPTIONAL, defaults to ORDER_MIDDLE) |
Definition at line 1107 of file ApplicationFramework.php.
ApplicationFramework::HtaccessSupport | ( | ) |
Determine if .htaccess files are enabled.
Definition at line 845 of file ApplicationFramework.php.
ApplicationFramework::HtmlCharset | ( | $NewSetting = NULL | ) |
Get/set HTTP character encoding value.
This is set for the HTTP header and may be queried and set in the HTML header by the active user interface. The default charset is UTF-8. A list of valid character set values can be found at http://www.iana.org/assignments/character-sets
NewSetting | New character encoding value string (e.g. "ISO-8859-1"). |
Definition at line 648 of file ApplicationFramework.php.
Referenced by LoadPage().
ApplicationFramework::IsRegisteredEvent | ( | $EventName | ) |
Check if event has been registered (is available to be signaled).
EventName | Name of event (string). |
Definition at line 1088 of file ApplicationFramework.php.
ApplicationFramework::IsStaticOnlyEvent | ( | $EventName | ) |
Report whether specified event only allows static callbacks.
EventName | Name of event to check. |
Definition at line 1250 of file ApplicationFramework.php.
ApplicationFramework::JumpToPageIsSet | ( | ) |
Report whether a page to autoload has been set.
Definition at line 634 of file ApplicationFramework.php.
ApplicationFramework::LoadFunction | ( | $Callback | ) |
Attempt to load code for function or method if not currently available.
Function code to be loaded should be located in a file named "F-XXX.php", where "XXX" is the function name. The file may reside in "local/include", any of the interface "include" directories, or any of the object directories.
Callback | Function or method info. |
Definition at line 779 of file ApplicationFramework.php.
References LogError().
ApplicationFramework::LoadPage | ( | $PageName | ) |
Load page PHP and HTML/TPL files.
PageName | Name of page to be loaded (e.g. "BrowseResources"). |
Definition at line 312 of file ApplicationFramework.php.
References GUIFile(), HtmlCharset(), PHP, and SignalEvent().
ApplicationFramework::LogError | ( | $Level, | |
$Msg | |||
) |
Write error message to log.
The difference between this and LogMessage is the way that an inability to write to the log is handled.
Level | Current message logging must be at or above specified level for error message to be written. (See LoggingLevel() for definitions of the error logging levels.) |
Msg | Error message text. |
Definition at line 862 of file ApplicationFramework.php.
References LogMessage().
Referenced by LoadFunction(), and SignalEvent().
ApplicationFramework::LoggingLevel | ( | $NewValue = NULL | ) |
Get/set logging level.
Status and error messages are only written if their associated level is at or below this value. The six levels of log messages are, in increasing level of severity: 6: TRACE - Very detailed logging, usually only used when attempting to diagnose a problem in one specific section of code. 5: DEBUG - Information that is diagnostically helpful when debugging. 4: INFO - Generally-useful information, that may come in handy but to which little attention is normally paid. (This should not be used for events that routinely occur with every page load.) 3: WARNING - An event that may potentially cause problems, but is automatically recovered from. 2: ERROR - Any error which is fatal to the operation currently being performed, but does not result in overall application shutdown or persistent data corruption. 1: FATAL - Any error which results in overall application shutdown or persistent data corruption.
NewValue | New error logging level. (OPTIONAL) |
Definition at line 971 of file ApplicationFramework.php.
ApplicationFramework::LogMessage | ( | $Level, | |
$Msg | |||
) |
Write status message to log.
The difference between this and LogError is the way that an inability to write to the log is handled.
Level | Current message logging must be at or above specified level for message to be written. (See LoggingLevel() for definitions of the error logging levels.) |
Msg | Message text. |
Definition at line 903 of file ApplicationFramework.php.
Referenced by LogError().
ApplicationFramework::MaxExecutionTime | ( | $NewValue = NULL | ) |
Get/set maximum PHP execution time.
Setting a new value is not possible if PHP is running in safe mode.
NewValue | New setting for max execution time in seconds. (OPTIONAL, but minimum value is 5 if specified) |
Definition at line 1553 of file ApplicationFramework.php.
ApplicationFramework::MaxTasks | ( | $NewValue = NULL | ) |
Get/set maximum number of tasks to have running simultaneously.
NewValue | New setting for max number of tasks. (OPTIONAL) |
Definition at line 1535 of file ApplicationFramework.php.
ApplicationFramework::OnCrash | ( | ) |
Called automatically at program termination to ensure output is written out.
(Not intended to be called directly, could not be made private to class because of automatic execution method.)
Definition at line 2118 of file ApplicationFramework.php.
References PHP.
ApplicationFramework::PUIFile | ( | $FileName | ) |
Search UI directories for specified image or CSS file and print name of correct file.
If the file is not found, nothing is printed.
This is intended to be called from within interface HTML files to ensure that the correct file is loaded, regardless of which interface it is in.
FileName | Base file name. |
Definition at line 753 of file ApplicationFramework.php.
References GUIFile().
ApplicationFramework::QueueTask | ( | $Callback, | |
$Parameters = NULL , |
|||
$Priority = self::PRIORITY_MEDIUM , |
|||
$Description = "" |
|||
) |
Add task to queue.
The Callback parameters is the PHP "callback" type. If $Callback refers to a function (rather than an object method) that function must be available in a global scope on all pages or must be loadable by ApplicationFramework::LoadFunction().
Callback | Function or method to call to perform task. |
Parameters | Array containing parameters to pass to function or method. (OPTIONAL, pass NULL for no parameters) |
Priority | Priority to assign to task. (OPTIONAL, defaults to PRIORITY_MEDIUM) |
Description | Text description of task. (OPTIONAL) |
Definition at line 1282 of file ApplicationFramework.php.
Referenced by QueueUniqueTask().
ApplicationFramework::QueueUniqueTask | ( | $Callback, | |
$Parameters = NULL , |
|||
$Priority = self::PRIORITY_MEDIUM , |
|||
$Description = "" |
|||
) |
Add task to queue if not already in queue or currently running.
If task is already in queue with a lower priority than specified, the task's priority will be increased to the new value. The Callback parameters is the PHP "callback" type. If $Callback refers to a function (rather than an object method) that function must be available in a global scope on all pages or must be loadable by ApplicationFramework::LoadFunction().
Callback | Function or method to call to perform task. |
Parameters | Array containing parameters to pass to function or method. (OPTIONAL, pass NULL for no parameters) |
Priority | Priority to assign to task. (OPTIONAL, defaults to PRIORITY_MEDIUM) |
Description | Text description of task. (OPTIONAL) |
Definition at line 1311 of file ApplicationFramework.php.
References QueueTask(), and TaskIsInQueue().
ApplicationFramework::RegisterEvent | ( | $EventsOrEventName, | |
$EventType = NULL |
|||
) |
Register one or more events that may be signaled.
EventsOrEventName | Name of event (string). To register multiple events, this may also be an array, with the event names as the index and the event types as the values. |
EventType | Type of event (constant). (OPTIONAL if EventsOrEventName is an array of events) |
Definition at line 1068 of file ApplicationFramework.php.
ApplicationFramework::ReQueueOrphanedTask | ( | $TaskId, | |
$NewPriority = NULL |
|||
) |
Move orphaned task back into queue.
TaskId | Task ID. |
NewPriority | New priority for task being requeued. (OPTIONAL) |
Definition at line 1435 of file ApplicationFramework.php.
ApplicationFramework::RequireUIFile | ( | $FileName | ) |
Add file to list of required UI files.
This is used to make sure a particular JavaScript or CSS file is loaded. Only files loaded with ApplicationFramework::GUIFile() or ApplicationFramework::PUIFile() are considered when deciding if a file has already been loaded.
FileName | Base name (without path) of required file. |
Definition at line 766 of file ApplicationFramework.php.
|
static |
Get/set session timeout in seconds.
NewValue | New session timeout value. (OPTIONAL) |
Definition at line 299 of file ApplicationFramework.php.
ApplicationFramework::SetBrowserDetectionFunc | ( | $DetectionFunc | ) |
Specify function to use to detect the web browser type.
Function should return an array of browser names.
DetectionFunc | Browser detection function callback. |
Definition at line 257 of file ApplicationFramework.php.
ApplicationFramework::SetJumpToPage | ( | $Page | ) |
Set URL of page to autoload after PHP page file is executed.
The HTML/TPL file will never be loaded if this is set. Pass in NULL to clear any autoloading.
Page | URL of page to jump to (autoload). If the URL does not appear to point to a PHP or HTML file then "index.php?P=" will be prepended to it. |
Definition at line 612 of file ApplicationFramework.php.
ApplicationFramework::SignalEvent | ( | $EventName, | |
$Parameters = NULL |
|||
) |
Signal that an event has occured.
EventName | Name of event being signaled. |
Parameters | Associative array of parameters for event, with CamelCase parameter names as indexes. (OPTIONAL) |
Definition at line 1168 of file ApplicationFramework.php.
References LogError().
Referenced by LoadPage().
ApplicationFramework::SuppressHTMLOutput | ( | $NewSetting = TRUE | ) |
Suppress loading of HTML files.
This is useful when the only output from a page is intended to come from the PHP page file.
NewSetting | TRUE to suppress HTML output, FALSE to not suppress HTML output. (OPTIONAL, defaults to TRUE) |
Definition at line 660 of file ApplicationFramework.php.
ApplicationFramework::TaskExecutionEnabled | ( | $NewValue = NULL | ) |
Get/set whether automatic task execution is enabled.
(This does not prevent tasks from being manually executed.)
NewValue | TRUE to enable or FALSE to disable. |
Definition at line 1518 of file ApplicationFramework.php.
ApplicationFramework::TaskIsInQueue | ( | $Callback, | |
$Parameters = NULL |
|||
) |
Check if task is already in queue or currently running.
When no $Parameters value is specified the task is checked against any other entries with the same $Callback.
Callback | Function or method to call to perform task. |
Parameters | Array containing parameters to pass to function or method. (OPTIONAL) |
Definition at line 1348 of file ApplicationFramework.php.
Referenced by QueueUniqueTask().
ApplicationFramework::TemplateLocationCacheExpirationInterval | ( | $NewInterval = -1 | ) |
Get/set UI template location cache expiration period in minutes.
An expiration period of 0 disables caching.
NewInterval | New expiration period in minutes. (OPTIONAL) |
Definition at line 282 of file ApplicationFramework.php.
const ApplicationFramework::EVENTTYPE_CHAIN = 2 |
Result chaining event type.
For this type the parameter array to each event handler is the return value from the previous handler, and the final return value is sent back to the event signaller.
Definition at line 1037 of file ApplicationFramework.php.
const ApplicationFramework::EVENTTYPE_DEFAULT = 1 |
Default event type.
Any handler return values are ignored.
Definition at line 1031 of file ApplicationFramework.php.
const ApplicationFramework::EVENTTYPE_FIRST = 3 |
First response event type.
For this type event handlers are called until one returns a non-NULL result, at which point no further handlers are called and that last result is passed back to the event signaller.
Definition at line 1043 of file ApplicationFramework.php.
const ApplicationFramework::EVENTTYPE_NAMED = 4 |
Named result event type.
Return values from each handler are placed into an array with the handler (function or class::method) name as the index, and that array is returned to the event signaller. The handler name for class methods is the class name plus "::" plus the method name. are called and that last result is passed back to the event signaller.
Definition at line 1051 of file ApplicationFramework.php.
const ApplicationFramework::LOGLVL_DEBUG = 5 |
DEBUG error logging leve.
Information that is diagnostically helpful when debugging.
Definition at line 998 of file ApplicationFramework.php.
const ApplicationFramework::LOGLVL_ERROR = 2 |
ERROR error logging level.
Any error which is fatal to the operation currently being performed, but does not result in overall application shutdown or persistent data corruption.
Definition at line 1015 of file ApplicationFramework.php.
const ApplicationFramework::LOGLVL_FATAL = 1 |
FATAL error logging level.
Any error which results in overall application shutdown or persistent data corruption.
Definition at line 1020 of file ApplicationFramework.php.
const ApplicationFramework::LOGLVL_INFO = 4 |
INFO error logging level.
Generally-useful information, that may come in handy but to which little attention is normally paid. (This should not be used for events that routinely occur with every page load.)
Definition at line 1004 of file ApplicationFramework.php.
const ApplicationFramework::LOGLVL_TRACE = 6 |
TRACE error logging level.
Very detailed logging, usually only used when attempting to diagnose a problem in one specific section of code.
Definition at line 993 of file ApplicationFramework.php.
const ApplicationFramework::LOGLVL_WARNING = 3 |
WARNING error logging level.
An event that may potentially cause problems, but is automatically recovered from.
Definition at line 1009 of file ApplicationFramework.php.
const ApplicationFramework::NOVALUE = ".-+-.NO VALUE PASSED IN FOR ARGUMENT.-+-." |
Definition at line 2240 of file ApplicationFramework.php.
const ApplicationFramework::ORDER_FIRST = 1 |
Run hooked function first (i.e.
before ORDER_MIDDLE events).
Definition at line 1054 of file ApplicationFramework.php.
const ApplicationFramework::ORDER_LAST = 3 |
Run hooked function last (i.e.
after ORDER_MIDDLE events).
Definition at line 1058 of file ApplicationFramework.php.
Referenced by PluginManager\__construct().
const ApplicationFramework::ORDER_MIDDLE = 2 |
Run hooked function after ORDER_FIRST and before ORDER_LAST events.
Definition at line 1056 of file ApplicationFramework.php.
const ApplicationFramework::PRIORITY_BACKGROUND = 4 |
Lowest priority.
Definition at line 1268 of file ApplicationFramework.php.
const ApplicationFramework::PRIORITY_HIGH = 1 |
Highest priority.
Definition at line 1262 of file ApplicationFramework.php.
const ApplicationFramework::PRIORITY_LOW = 3 |
Lower priority.
Definition at line 1266 of file ApplicationFramework.php.
Referenced by SPTRecommender\RunUpdateForItem().
const ApplicationFramework::PRIORITY_MEDIUM = 2 |
Medium (default) priority.
Definition at line 1264 of file ApplicationFramework.php.