diff --git a/admin/tool/log/classes/log/manager.php b/admin/tool/log/classes/log/manager.php index 47bd41c3f2f..894fe94e7de 100644 --- a/admin/tool/log/classes/log/manager.php +++ b/admin/tool/log/classes/log/manager.php @@ -95,13 +95,17 @@ class manager implements \core\log\manager { * * This way the reports find out available sources of data. * + * @param string $interface Returned stores must implement this interface. + * * @return \core\log\reader[] list of available log data readers */ - public function get_readers() { + public function get_readers($interface = null) { $this->init(); $return = array(); foreach ($this->readers as $plugin => $reader) { - $return[$plugin] = $reader; + if (empty($interface) || ($reader instanceof $interface)) { + $return[$plugin] = $reader; + } } return $return; } diff --git a/lib/classes/log/manager.php b/lib/classes/log/manager.php index d456165da73..b7b0849ea20 100644 --- a/lib/classes/log/manager.php +++ b/lib/classes/log/manager.php @@ -38,9 +38,11 @@ interface manager { /** * Return list of available log readers. * + * @param string $interface All returned readers must implement this interface. + * * @return \core\log\reader[] */ - public function get_readers(); + public function get_readers($interface = null); /** * Dispose all initialised stores.