[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/admin/tool/log/store/legacy/classes/log/ -> store.php (summary)

Legacy log reader.

Copyright: 2013 Petr Skoda {@link http://skodak.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 364 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

store:: (10 methods):
  __construct()
  replace_sql_legacy()
  get_events_select()
  get_events_select_iterator()
  get_log_event()
  get_events_select_count()
  is_logging()
  dispose()
  legacy_add_to_log()
  replace_crud()


Class: store  - X-Ref

__construct(\tool_log\log\manager $manager)   X-Ref
No description

replace_sql_legacy($selectwhere, array $params, $sort = '')   X-Ref
This method contains mapping required for Moodle core to make legacy store compatible with other sql_reader based
queries.

param: string $selectwhere Select statment
param: array $params params for the sql
param: string $sort sort fields
return: array returns an array containing the sql predicate, an array of params and sorting parameter.

get_events_select($selectwhere, array $params, $sort, $limitfrom, $limitnum)   X-Ref
No description

get_events_select_iterator($selectwhere, array $params, $sort, $limitfrom, $limitnum)   X-Ref
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.

param: string $selectwhere
param: array $params
param: string $sort
param: int $limitfrom
param: int $limitnum
return: \Traversable|\core\event\base[]

get_log_event($data)   X-Ref
Returns an event from the log data.

param: stdClass $data Log data
return: \core\event\base

get_events_select_count($selectwhere, array $params)   X-Ref
No description

is_logging()   X-Ref
Are the new events appearing in the reader?

return: bool true means new log events are being added, false means no new data will be added

dispose()   X-Ref
No description

legacy_add_to_log($courseid, $module, $action, $url, $info, $cm, $user, $ip = null, $time = null)   X-Ref
Legacy add_to_log() code.

param: int $courseid The course id
param: string $module The module name  e.g. forum, journal, resource, course, user etc
param: string $action 'view', 'update', 'add' or 'delete', possibly followed by another word to clarify.
param: string $url The file and parameters used to see the results of the action
param: string $info Additional description information
param: int $cm The course_module->id if there is one
param: int|\stdClass $user If log regards $user other than $USER
param: string $ip Override the IP, should only be used for restore.
param: int $time Override the log time, should only be used for restore.

replace_crud($match)   X-Ref
Generate a replace string for crud related sql conditions. This function is called as callback to preg_replace_callback()
on the actual sql.

param: array $match matched string for the passed pattern
return: string The sql string to use instead of original



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1