Habari\EventLog::get_module PHP Method

get_module() public static method

Get the module in which the logged code was executed
public static get_module ( null $module = null, integer $level = 2 ) : string
$module null
$level integer How many backtrace calls to go back through the trace
return string The classname or .php module in which the log code was called.
    public static function get_module($module = null, $level = 2)
    {
        if (is_null($module)) {
            $bt = debug_backtrace();
            $last = $bt[$level];
            $module = isset($last['class']) ? $last['class'] : basename($last['file'], '.php');
        }
        return $module;
    }