‪TYPO3CMS  ‪main
TYPO3\CMS\Extbase\Error\Message Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Error\Message:
TYPO3\CMS\Extbase\Error\Error TYPO3\CMS\Extbase\Error\Notice TYPO3\CMS\Extbase\Error\Warning TYPO3\CMS\Extbase\Validation\Error

Public Member Functions

 __construct (string $message, int $code, array $arguments=[], string $title='')
 
string getMessage ()
 
int getCode ()
 
 getArguments ()
 
 getTitle ()
 
 render ()
 
string __toString ()
 

Protected Attributes

string $message = 'Unknown message'
 
int $code
 
array $arguments = array( )
 
string $title = ''
 

Detailed Description

An object representation of a generic message. Usually, you will use Error, Warning or Notice instead of this one.

Definition at line 23 of file Message.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Error\Message::__construct ( string  $message,
int  $code,
array  $arguments = [],
string  $title = '' 
)

Constructs this error

Parameters
string$message‪An english error message which is used if no other error message can be resolved
int$code‪A unique error code
array$arguments‪Array of arguments to be replaced in message
string$title‪optional title for the message

Definition at line 57 of file Message.php.

References TYPO3\CMS\Extbase\Error\Message\$arguments, TYPO3\CMS\Extbase\Error\Message\$code, TYPO3\CMS\Extbase\Error\Message\$message, and TYPO3\CMS\Extbase\Error\Message\$title.

Member Function Documentation

◆ __toString()

string TYPO3\CMS\Extbase\Error\Message::__toString ( )

Converts this error into a string

Returns
‪string

Definition at line 117 of file Message.php.

References TYPO3\CMS\Extbase\Error\Message\render().

◆ getArguments()

TYPO3\CMS\Extbase\Error\Message::getArguments ( )

Get arguments

Definition at line 88 of file Message.php.

References TYPO3\CMS\Extbase\Error\Message\$arguments.

◆ getCode()

int TYPO3\CMS\Extbase\Error\Message::getCode ( )

◆ getMessage()

string TYPO3\CMS\Extbase\Error\Message::getMessage ( )

Returns the error message

Returns
‪string The error message

Definition at line 70 of file Message.php.

References TYPO3\CMS\Extbase\Error\Message\$message.

Referenced by TYPO3\CMS\Form\Mvc\Property\Exception\TypeConverterException\fromError().

◆ getTitle()

TYPO3\CMS\Extbase\Error\Message::getTitle ( )

Get title

Definition at line 96 of file Message.php.

References TYPO3\CMS\Extbase\Error\Message\$title.

◆ render()

TYPO3\CMS\Extbase\Error\Message::render ( )

Return the rendered message

Definition at line 104 of file Message.php.

References TYPO3\CMS\Extbase\Error\Message\$message.

Referenced by TYPO3\CMS\Extbase\Error\Message\__toString().

Member Data Documentation

◆ $arguments

array TYPO3\CMS\Extbase\Error\Message::$arguments = array( )
protected

The message arguments. Will be replaced in the message body.

Definition at line 41 of file Message.php.

Referenced by TYPO3\CMS\Extbase\Error\Message\__construct(), and TYPO3\CMS\Extbase\Error\Message\getArguments().

◆ $code

int TYPO3\CMS\Extbase\Error\Message::$code
protected

The error code

Definition at line 35 of file Message.php.

Referenced by TYPO3\CMS\Extbase\Error\Message\__construct(), and TYPO3\CMS\Extbase\Error\Message\getCode().

◆ $message

string TYPO3\CMS\Extbase\Error\Message::$message = 'Unknown message'
protected

◆ $title

string TYPO3\CMS\Extbase\Error\Message::$title = ''
protected

An optional title for the message (used eg. in flashMessages).

Definition at line 47 of file Message.php.

Referenced by TYPO3\CMS\Extbase\Error\Message\__construct(), and TYPO3\CMS\Extbase\Error\Message\getTitle().