LimeSurvey API - Master branch

OperationResult

Class OperationResult

This class represents the result of an operation (ie. the result of a service's method), with a status and an optional list of messages.

Table of Contents

Properties

$messages  : array<string|int, TypedMessage>
$success  : bool

Methods

__construct()  : mixed
addMessage()  : mixed
appendMessage()  : mixed
getMessages()  : array<string|int, TypedMessage>
Returns the messages of the given type, or all messages if no type is specified.
getRawMessages()  : array<string|int, string>
Returns the raw messages of the given type, or all messages if no type is specified.
isSuccess()  : bool
setMessages()  : mixed
setRawMessages()  : mixed
Sets messages from an array of strings
setSuccess()  : void

Properties

Methods

addMessage()

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

getMessages()

Returns the messages of the given type, or all messages if no type is specified.

public getMessages([string|null $type = null ]) : array<string|int, TypedMessage>
Parameters
$type : string|null = null
Return values
array<string|int, TypedMessage>

getRawMessages()

Returns the raw messages of the given type, or all messages if no type is specified.

public getRawMessages([string|null $type = null ]) : array<string|int, string>
Parameters
$type : string|null = null
Return values
array<string|int, string>

setRawMessages()

Sets messages from an array of strings

public setRawMessages(array<string|int, string> $messages) : mixed
Parameters
$messages : array<string|int, string>

setSuccess()

public setSuccess(bool $success) : void
Parameters
$success : bool

        
On this page

Search results