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. | |
RegisterEvent ($EventsOrEventName, $EventType=NULL) | |
Register one or more events that may be signaled. | |
HookEvent ($EventsOrEventName, $Callback) | |
Hook one or more functions to be called when the specified event is signaled. | |
SignalEvent ($EventName, $Parameters=NULL) | |
Signal that an event has occured. | |
Task Management | |
const | PRIORITY_HIGH = 1 |
Highest priority. | |
const | PRIORITY_MEDIUM = 2 |
Medium (default) priority. | |
const | PRIORITY_LOW = 3 |
Lowest priority. | |
QueueTask ($Callback, $Parameters, $Priority=self::PRIORITY_MEDIUM, $Description="") | |
Add task to queue. | |
QueueUniqueTask ($Callback, $Parameters, $Priority=self::PRIORITY_MEDIUM, $Description="") | |
Add task to queue if not already in queue. | |
TaskIsInQueue ($Callback, $Parameters=NULL) | |
Check if task is already in queue. | |
GetTaskQueueSize ($Priority=NULL) | |
Retrieve current number of tasks in queue. | |
GetTaskList ($Count=100, $Offset=0) | |
Retrieve list of tasks currently in queue. | |
RunNextTask () | |
Run the next task in the queue. | |
Application Framework | |
AddObjectDirectories ($Dirs) | |
Add additional directories to be searched for object files when autoloading. | |
LoadPage ($PageName) | |
Load page PHP and HTML/TPL files. | |
SetJumpToPage ($Page) | |
Set URL of page to autoload after PHP page file is executed. | |
JumpToPageIsSet () | |
Report whether a page to autoload has been set. | |
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) | |
Return path to specified image or CSS file. | |
PUIFile ($FileName) | |
Print path to specified image or CSS file. | |
FindCommonTemplate ($PageName) | |
Get full path to HTML or CSS file. |
Definition at line 7 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 280 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 326 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 56 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 304 of file ApplicationFramework.php.
ApplicationFramework::FindCommonTemplate | ( | $ | PageName | ) |
Get full path to HTML or CSS file.
PageName | File or short page name. |
Definition at line 370 of file ApplicationFramework.php.
Referenced by LoadPage().
ApplicationFramework::GetTaskList | ( | $ | 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 644 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 632 of file ApplicationFramework.php.
ApplicationFramework::GUIFile | ( | $ | FileName | ) |
Return path to specified image or CSS file.
FileName | Base file name. |
Definition at line 336 of file ApplicationFramework.php.
Referenced by PUIFile().
ApplicationFramework::HookEvent | ( | $ | EventsOrEventName, | |
$ | Callback | |||
) |
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) |
Definition at line 442 of file ApplicationFramework.php.
ApplicationFramework::JumpToPageIsSet | ( | ) |
Report whether a page to autoload has been set.
Definition at line 258 of file ApplicationFramework.php.
ApplicationFramework::LoadPage | ( | $ | PageName | ) |
Load page PHP and HTML/TPL files.
PageName | Name of page to be loaded (e.g. "BrowseResources"). |
Definition at line 65 of file ApplicationFramework.php.
References FindCommonTemplate(), PHP, and SignalEvent().
ApplicationFramework::PUIFile | ( | $ | FileName | ) |
Print path to specified image or CSS 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 360 of file ApplicationFramework.php.
References GUIFile().
ApplicationFramework::QueueTask | ( | $ | Callback, | |
$ | Parameters, | |||
$ | Priority = self::PRIORITY_MEDIUM , |
|||
$ | Description = "" | |||
) |
Add task to queue.
The Callback parameters is the PHP "callback" type.
Callback | Function or method to call to perform task. | |
Parameters | Array containing parameters to pass to function or method. | |
Priority | Priority to assign to task. (OPTIONAL, defaults to PRIORITY_MEDIUM) | |
Description | Text description of task. (OPTIONAL) |
Definition at line 574 of file ApplicationFramework.php.
Referenced by QueueUniqueTask().
ApplicationFramework::QueueUniqueTask | ( | $ | Callback, | |
$ | Parameters, | |||
$ | Priority = self::PRIORITY_MEDIUM , |
|||
$ | Description = "" | |||
) |
Add task to queue if not already in queue.
The Callback parameters is the PHP "callback" type.
Callback | Function or method to call to perform task. | |
Parameters | Array containing parameters to pass to function or method. | |
Priority | Priority to assign to task. (OPTIONAL, defaults to PRIORITY_MEDIUM) | |
Description | Text description of task. (OPTIONAL) |
Definition at line 595 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 416 of file ApplicationFramework.php.
ApplicationFramework::RunNextTask | ( | ) |
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 241 of file ApplicationFramework.php.
ApplicationFramework::SignalEvent | ( | $ | EventName, | |
$ | Parameters = NULL | |||
) |
Signal that an event has occured.
EventName | Name of event being signaled. | |
Parameters | Array of parameters associated with event. (OPTIONAL) |
Definition at line 490 of file ApplicationFramework.php.
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 269 of file ApplicationFramework.php.
ApplicationFramework::TaskIsInQueue | ( | $ | Callback, | |
$ | Parameters = NULL | |||
) |
Check if task is already in queue.
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 617 of file ApplicationFramework.php.
Referenced by QueueUniqueTask().
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 392 of file ApplicationFramework.php.
const ApplicationFramework::EVENTTYPE_DEFAULT = 1 |
Default event type.
Any handler return values are ignored.
Definition at line 386 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 398 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 406 of file ApplicationFramework.php.
const ApplicationFramework::PRIORITY_HIGH = 1 |
const ApplicationFramework::PRIORITY_LOW = 3 |
const ApplicationFramework::PRIORITY_MEDIUM = 2 |