Stud.IP
6.1
|
Public Member Functions | |
__construct (string $message='', int $type=Information::INFO, string $codeword='', ?\Range $range=null) | |
getMessage () | |
setMessage (string $message) | |
getType () | |
setType (int $type) | |
getCodeword () | |
setCodeword (string $codeword) | |
getRange () | |
setRange (\Range $range) | |
__toString () | |
toMessageBox (bool $verbose=false) | |
Data Fields | |
const | INFO = 0 |
const | WARNING = 1 |
const | ERROR = 2 |
Protected Attributes | |
int | $type = Information::INFO |
string | $codeword |
string | $message |
Range | $range = null |
The Information class represents an information from the internals of Stud.IP that shall be displayed to the user, but not necessarily right away in the form of an exception or a simple piece of text. The information class allows the use of codewords (error codes) and to indicate whether the information is just of informative character, a warning or an error.
__construct | ( | string | $message = '' , |
int | $type = Information::INFO , |
||
string | $codeword = '' , |
||
?\Range | $range = null |
||
) |
__toString | ( | ) |
Generates a string representation of the information.
getCodeword | ( | ) |
getMessage | ( | ) |
getRange | ( | ) |
getType | ( | ) |
setCodeword | ( | string | $codeword | ) |
setMessage | ( | string | $message | ) |
setRange | ( | \Range | $range | ) |
setType | ( | int | $type | ) |
toMessageBox | ( | bool | $verbose = false | ) |
Generates a Stud.IP message box for the information.
$verbose | bool Whether to include the codeword (true) or not (false). Defaults to false. |
|
protected |
|
protected |
|
protected |
|
protected |
const ERROR = 2 |
const INFO = 0 |
const WARNING = 1 |