-
Notifications
You must be signed in to change notification settings - Fork 16
Capture validation information
The information about a validation event recorded by the logging class when it writes to your choice of log output target (such as error log, console, etc.) is a single line summary of the event. There may be times when you need access to the underlying detail, perhaps so you can take action when specific events occur. We use this ability in our conformance test harness so we are able to include specific information in the conformance test result log file.
The PEAR logging system used by our XBRL processor supports the concept of an 'observer'. This is a class that has a 'notify' function the logging system can call whenever an event is logged. The class can be as simple as this:
class observer extends Log_observer
{
public function notify( $event )
{
if ( ! isset( $event['source'] ) ) return;
// Do something useful with the event detail
$source = $event['source'];
}
}
'source' is an array included in $event that contains the log of the XBRL validation event. The other element in $event is 'message' which is the same message written to the normal output targets.
This class can then be instantiated and passed to be attached as an observer of the XBRL processor log events:
$observer = new observer();
XBRL_Log::getInstance()->attach( $observer );
Copyright © 2021 and later years Lyquidity Solutions Limited
- About us
- Purpose
- XBRL support
- Road Map
- Why PHP?
- Contributing
- License
- Reference links
- Case Study
- Digital Financial Reporting
- Digital Financial Reporting examples
Overview
Class and function reference
Compiled taxonomy structure
Common arrays
Compiling
Compiling
Processing linkbases
Additional taxonomy processing
Extension taxonomies
Compiled taxonomy folder
How do I...?
Navigate a node tree
Find a node in a tree
Find elements in a taxonomy
Load an instance document
Find elements in an instance
Create a simple report
Create a comparison report
Example custom report
Work with dimensions
Sign and Verify
Validate
Change the logging
Capture validation information