monitor_pass_error
void monitor_pass_error(integer $errno, string $errstr, string $errfile, integer $errline)
Description: Should be called from a custom error handler to pass the error to the monitor. The user function needs to accept two parameters: the error code, and a string describing the error. Then there are two optional parameters that may be supplied: the filename in which the error occurred and the line number in which the error occurred.
monitor_set_aggregation_hint
void monitor_set_aggregation_hint(string $hint)
Description: Limited in the database to 255 chars, this API is a global variable that can be set anywhere and in any hierarchy. The purpose of this API is to incorporate locations of occurrences in the script. This API is used when there are events that require the location in the script for diagnosing the reason behind the event occurring. For example: Global Events require the application that generated the event. Adding the Hint API can assist in the identification process. This string that is supplied by the user to differentiate between pages that have the same URL but different parameters.
Return Values: If the user did not supply a hint the default hint is an empty string.
Parameters: $hint
monitor_custom_event
void monitor_custom_event(string $class, string $text[, integer $severe, mixed $user_data])
Description: Custom Events are used to generate an event whenever the API function monitor_custom_event() is called from the PHP script. This event type enables the generation of an event on occurrences that are not necessarily built-in Platform events (error and performance issues). Custom Events are used whenever you decide that it is significant to generate an event in a certain situation. Each event type is given a name for easy identification ($type).
Parameters:
$class - helps to define several types of custom events. This
description will be showed in the PHP Intelligence, Event List and in
the Event Details (report).
$text - error text used to describe the reason for the event.
This text will appear in the Event Details.
$severe - the severity level of the triggered event, default
value is Severe.
$user_data - adds a PHP variable that will be viewed in the
Event Details screen (in Event Context-> Variables->User Defined).
This forms the stored Event Context (similar to the information obtained
in a PHP error event).
monitor_httperror_event
void monitor_httperror_event(integer $error_code, string $url [, bool $severe])
Description: Create an HTTPERROR event
Parameters:
$error_code - the http error code to be associated with this
event
$url - the URL to be associated with this event
$severe - the severity of the event: 0 - not severe, 1 - severe
[edit]monitor_license_info
void monitor_license_info()
Description: Returns an array containing information about:
Module loading status (and cause of error if module failed to load)
Module license status (and cause of error if license not valid)
register_event_handler
boolean register_event_handler($event_handler_func [,$handler_register_name],$event_type_mask])
Description: Allow you to register a user function as an event handler. When a monitor event is triggered all the user event handler are called and the return value from the handler is saved in an array keyed by the name the event handler was registered under. The event handlers results array is saved in the event_extra_data table.
Return Value: TRUE on success and FALSE if an error occurs.
Parameters: The first argument is a callback function that will be call when the event is triggered, object methods may also be invoked statically using this function by passing array ($objectname, $methodname) to the function parameter. The second (optional) argument is name this function is registered under - if none is supplied, the function will be registered under it's own name. The third (optional) parameter is a mask of event types that the handler should be called on by default it's set to MONITOR_EVENT_ALL.
unregister_event_handler
boolean unregister_event_handler(string handler_name)
Description: Allow you to un-register an event handler.
Return Value: TRUE on success and FALSE if no handler we registered under the given name.
Parameters: string handler_name - the name you registered with the handler you now wish to un-register.
|
|
|
|
|
Related Links: |
|
|
|