Documentation

UploadResponse

UploadResponses result from an upload request.

They carry information about problems concerning uploaded files.

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Project Team SS4U info@cloudrexx.com

subpackage

coremodule_uploader

Table of Contents

Constants

STATUS_ERROR  = 2
Define the error status
STATUS_INFO  = 3
Define the info status
STATUS_OK  = 0
Define the normal status
STATUS_WARNING  = 1
Define the warning status

Properties

$logs  : array<string|int, mixed>
$statusTexts  : array<string|int, mixed>
$worstStatus  : int
The worstStatus is indentifying status of the upload files.

Methods

__construct()  : mixed
addMessage()  : mixed
Adds a log message concerning a file to the response.
getResponse()  : array<string|int, mixed>
get the response
getWorstStatus()  : int
get the worst status

Constants

Properties

$logs

protected array<string|int, mixed> $logs = array()

array( array( 'status' => 'ok'|'error'..., 'message' => string, 'file' => string ) )

$statusTexts

protected array<string|int, mixed> $statusTexts = array(self::STATUS_OK => 'ok', self::STATUS_WARNING => 'warning', self::STATUS_ERROR => 'error', self::STATUS_INFO => 'info')

$worstStatus

The worstStatus is indentifying status of the upload files.

protected int $worstStatus = 0

Methods

addMessage()

Adds a log message concerning a file to the response.

public addMessage(string $status, string $message) : mixed
Parameters
$status : string

one of UploadResponse::STATUS_(OK|WARNING|ERROR|INFO)

$message : string

message

getResponse()

get the response

public getResponse() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results