|
| __construct (\tool_log\log\manager $manager) |
| Construct. More...
|
|
| dispose () |
| Dispose off database connection after pushing any buffered events to the database.
|
|
| get_config_value ($name, $default=null) |
| Get a config value for the store. More...
|
|
| get_description () |
| Longer description of the log data source. More...
|
|
| get_events_select ($selectwhere, array $params, $sort, $limitfrom, $limitnum) |
| Get an array of events based on the passed on params. More...
|
|
| get_events_select_count ($selectwhere, array $params) |
| Get number of events present for the given select clause. More...
|
|
| get_events_select_iterator ($selectwhere, array $params, $sort, $limitfrom, $limitnum) |
| Fetch records using given criteria returning a Traversable object. More...
|
|
| get_extdb () |
| Get the external database object. More...
|
|
| get_log_event ($data) |
| Returns an event from the log data. More...
|
|
| get_name () |
| Localised name of the reader. More...
|
|
| is_logging () |
| Are the new events appearing in the reader? More...
|
|
| write (\core\event\base $event) |
| Write one event to the store. More...
|
|
◆ __construct()
Construct.
- Parameters
-
tool_log\log\manager | $manager | |
◆ get_config_value()
logstore_database\log\store::get_config_value |
( |
|
$name, |
|
|
|
$default = null |
|
) |
| |
Get a config value for the store.
- Parameters
-
string | $name | Config name |
mixed | $default | default value |
- Return values
-
mixed | config value if set, else the default value. |
◆ get_description()
core\log\reader::get_description |
( |
| ) |
|
|
inherited |
Longer description of the log data source.
- Return values
-
◆ get_events_select()
logstore_database\log\store::get_events_select |
( |
|
$selectwhere, |
|
|
array |
$params, |
|
|
|
$sort, |
|
|
|
$limitfrom, |
|
|
|
$limitnum |
|
) |
| |
Get an array of events based on the passed on params.
- Parameters
-
string | $selectwhere | select conditions. |
array | $params | params. |
string | $sort | sortorder. |
int | $limitfrom | limit constraints. |
int | $limitnum | limit constraints. |
- Return values
-
Implements core\log\sql_reader.
◆ get_events_select_count()
logstore_database\log\store::get_events_select_count |
( |
|
$selectwhere, |
|
|
array |
$params |
|
) |
| |
Get number of events present for the given select clause.
- Parameters
-
string | $selectwhere | select conditions. |
array | $params | params. |
- Return values
-
int | Number of events available for the given conditions |
Implements core\log\sql_reader.
◆ get_events_select_iterator()
logstore_database\log\store::get_events_select_iterator |
( |
|
$selectwhere, |
|
|
array |
$params, |
|
|
|
$sort, |
|
|
|
$limitfrom, |
|
|
|
$limitnum |
|
) |
| |
Fetch records using given criteria returning a Traversable object.
Note that the traversable object contains a moodle_recordset, so remember that is important that you call close() once you finish using it.
- Parameters
-
string | $selectwhere | |
array | $params | |
string | $sort | |
int | $limitfrom | |
int | $limitnum | |
- Return values
-
Implements core\log\sql_reader.
◆ get_extdb()
logstore_database\log\store::get_extdb |
( |
| ) |
|
Get the external database object.
- Return values
-
◆ get_log_event()
logstore_database\log\store::get_log_event |
( |
|
$data | ) |
|
◆ get_name()
core\log\reader::get_name |
( |
| ) |
|
|
inherited |
Localised name of the reader.
To be used in selection for in reports.
- Return values
-
◆ init()
logstore_database\log\store::init |
( |
| ) |
|
|
protected |
Setup the Database.
- Return values
-
◆ insert_event_entries()
logstore_database\log\store::insert_event_entries |
( |
|
$evententries | ) |
|
|
protected |
Insert events in bulk to the database.
- Parameters
-
array | $evententries | raw event data |
◆ is_event_ignored()
Should the event be ignored (== not logged)?
- Parameters
-
- Return values
-
◆ is_logging()
logstore_database\log\store::is_logging |
( |
| ) |
|
Are the new events appearing in the reader?
- Return values
-
bool | true means new log events are being added, false means no new data will be added |
Implements core\log\reader.
◆ write()
Write one event to the store.
- Parameters
-
- Return values
-
The documentation for this class was generated from the following file:
- admin/tool/log/store/database/classes/log/store.php