MMOframework
Pourquoi l'IA Playground Bibliothèques Développeurs Agence
FR EN
Créer un projet en direct
Index

ClamdScanner

MMO\edms\scanners · 1 symbole · générée le 30 Nov 2026

class

ClamdScanner

ClamdScanner.php:19

The files analysed by a clamd daemon (ClamAV), through its socket: the bytes are sent to it (INSTREAM), so it needs no access to the application's files, and php no extension.

class MMO\edms\scanners\ClamdScanner implements MMO\edms\interfaces\iScanner
Espace de noms
MMO\edms\scanners
Implémente
iScanner
clamd refuses a stream bigger than its `StreamMaxLength` (25 MB by default): set it to edms' `maxSize` at least, or the bigger files cannot be analysed ([`eScanUnavailable`](https://mmoframework.fr/documentation/mmo.edms/php/exceptions/eScanUnavailable.md#escanunavailable)).
"MMO\\edms\\FileManager": { "scanner": {"$": "MMO\\edms\\scanners\\ClamdScanner", "socket": "unix:///run/clamav/clamd.ctl"} }

Index

chunkSize
socket
timeout
ask($command, $stream)Send $command (z commands: their answer ends with a NUL), then the bytes of $stream, if any, in chunks
ping()
scan($filename)
__construct($socket)

Propriétés3

chunkSize

int $chunkSize = 65536
Type
int

socket

string $socket = 'unix:///run/clamav/clamd.ctl'
Type
string

timeout

float $timeout = 60.0
Type
float

Méthodes4

ask($command, $stream)

ClamdScanner.php:57

Send $command (z commands: their answer ends with a NUL), then the bytes of $stream, if any, in chunks

protected function ask(string $command, $stream = null): string
$commandstring
$stream = null
retournestringclamd's answer
lèveif clamd cannot be reached, or does not answer