Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | List of all members
core\antivirus\manager Class Reference

Class used for various antivirus related stuff. More...

Static Public Member Functions

static get_antivirus ($antivirusname)
 Returns instance of antivirus. More...
 
static get_available ()
 Get the list of available antiviruses. More...
 
static scan_data ($data)
 Scan data steam using all enabled antiviruses, throws exception in case of infected data. More...
 
static scan_file ($file, $filename, $deleteinfected)
 Scan file using all enabled antiviruses, throws exception in case of infected file. More...
 

Detailed Description

Class used for various antivirus related stuff.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ get_antivirus()

static core\antivirus\manager::get_antivirus (   $antivirusname)
static

Returns instance of antivirus.

Parameters
string$antivirusnamename of antivirus.
Return values
object|boolantivirus instance or false if does not exist.

◆ get_available()

static core\antivirus\manager::get_available ( )
static

Get the list of available antiviruses.

Return values
arrayArray ('antivirusname'=>'localised antivirus name').

◆ scan_data()

static core\antivirus\manager::scan_data (   $data)
static

Scan data steam using all enabled antiviruses, throws exception in case of infected data.

Parameters
string$dataThe varaible containing the data to scan.
Exceptions
core

◆ scan_file()

static core\antivirus\manager::scan_file (   $file,
  $filename,
  $deleteinfected 
)
static

Scan file using all enabled antiviruses, throws exception in case of infected file.

Parameters
string$fileFull path to the file.
string$filenameName of the file (could be different from physical file if temp file is used).
bool$deleteinfectedwhether infected file needs to be deleted.
Exceptions
core

The documentation for this class was generated from the following file: