private function parse_unixsocket_response($output) {
        $splitoutput = explode(': ', $output);
        $message = trim($splitoutput[1]);
        if ($message === 'OK') {
            return self::SCAN_RESULT_OK;
        } else {
            $parts = explode(' ', $message);
            $status = array_pop($parts);
            if ($status === 'FOUND') {
                return self::SCAN_RESULT_FOUND;
            } else {
                $notice = get_string('clamfailed', 'antivirus_clamav', $this->get_clam_error_code(2));
                $notice .= "\n\n" . $output;
                $this->set_scanning_notice($notice);
                return self::SCAN_RESULT_ERROR;
            }
        }
    }
private function parse_unixsocket_response($output) {
        $splitoutput = explode(': ', $output);
        $message = trim($splitoutput[1]);
        if ($message === 'OK') {
            return self::SCAN_RESULT_OK;
        } else {
            $parts = explode(' ', $message);
            $status = array_pop($parts);
            if ($status === 'FOUND') {
                return self::SCAN_RESULT_FOUND;
            } else {
                $notice = get_string('clamfailed', 'antivirus_clamav', $this->get_clam_error_code(2));
                $notice .= "\n\n" . $output;
                $this->set_scanning_notice($notice);
                return self::SCAN_RESULT_ERROR;
            }
        }
    }
private function parse_unixsocket_response ( $ output ) { $ splitoutput = explode ( ': ' , $ output ) ; $ message = trim ( $ splitoutput [ 1 ] ) ; if ( $ message === 'OK' ) { return self :: SCAN_RESULT_OK ; } else { $ parts = explode ( ' ' , $ message ) ; $ status = array_pop ( $ parts ) ; if ( $ status === 'FOUND' ) { return self :: SCAN_RESULT_FOUND ; } else { $ notice = get_string ( 'clamfailed' , 'antivirus_clamav' , $ this -> get_clam_error_code ( 2 ) ) ; $ notice .= "\n\n" . $ output ; $ this -> set_scanning_notice ( $ notice ) ; return self :: SCAN_RESULT_ERROR ; } } }
Parse unix socket command response.

@param string $output The unix socket command response.
@return int Scanning result constant.
Parse unix socket command response .