Base abstract antivirus scanner class.
More...
|
const | SCAN_RESULT_ERROR = 2 |
| Scanning result indicating the error.
|
|
const | SCAN_RESULT_FOUND = 1 |
| Scanning result indicating that virus is found.
|
|
const | SCAN_RESULT_OK = 0 |
| Scanning result indicating no virus found.
|
|
|
stdClass | $config |
| the config for antivirus
|
|
string | $scanningnotice = '' |
| scanning notice
|
|
Base abstract antivirus scanner class.
@subpackage antivirus
- Copyright
- 2015 Ruslan Kabalin, Lancaster University.
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core\antivirus\scanner::__construct |
( |
| ) |
|
Class constructor.
- Return values
-
◆ get_config()
core\antivirus\scanner::get_config |
( |
|
$property | ) |
|
Config get method.
- Parameters
-
string | $property | config property to get. |
- Return values
-
- Exceptions
-
◆ get_scanning_notice()
core\antivirus\scanner::get_scanning_notice |
( |
| ) |
|
Get scanning notice.
- Return values
-
◆ is_configured()
core\antivirus\scanner::is_configured |
( |
| ) |
|
|
abstract |
Are the antivirus settings configured?
- Return values
-
bool | True if plugin has been configured. |
Reimplemented in antivirus_clamav\scanner.
◆ message_admins()
core\antivirus\scanner::message_admins |
( |
|
$notice | ) |
|
Email admins about antivirus scan outcomes.
- Parameters
-
string | $notice | The body of the email to be sent. |
- Return values
-
◆ scan_data()
core\antivirus\scanner::scan_data |
( |
|
$data | ) |
|
Scan data.
By default it saves data variable content to file and then scans it using scan_file method, however if antivirus plugin permits scanning data directly, the method can be overridden.
- Parameters
-
string | $data | The variable containing the data to scan. |
- Return values
-
int | Scanning result constants. |
Reimplemented in antivirus_clamav\scanner.
◆ scan_file()
core\antivirus\scanner::scan_file |
( |
|
$file, |
|
|
|
$filename |
|
) |
| |
|
abstract |
Scan file.
- Parameters
-
string | $file | Full path to the file. |
string | $filename | Name of the file (could be different from physical file if temp file is used). |
- Return values
-
int | Scanning result constants. |
Reimplemented in antivirus_clamav\scanner.
◆ set_scanning_notice()
core\antivirus\scanner::set_scanning_notice |
( |
|
$notice | ) |
|
|
protected |
Set scanning notice.
- Parameters
-
string | $notice | notice to set. |
- Return values
-
The documentation for this class was generated from the following file: