Status
A class representing a certain status
Table of Contents
Constants
Properties
Methods
- __construct() : mixed
- Construct a status
- __toString() : string
- Creates a string representation of a status.
- getMessage() : string
- Gets the status' message (if any)
- getSeverity() : int
- Gets the status' severity
- getTitle() : string
- Gets the status' title
- getValue() : string
- Gets the status' value
Constants
ERROR
public
mixed
ERROR
= 2
INFO
public
mixed
INFO
= -1
NOTICE
public
mixed
NOTICE
= -2
OK
public
mixed
OK
= 0
WARNING
public
mixed
WARNING
= 1
Properties
$message
protected
string
$message
$severity
protected
int
$severity
$title
protected
string
$title
$value
protected
string
$value
Methods
__construct()
Construct a status
public
__construct(string $title, string $value[, string $message = '' ][, int $severity = self::OK ]) : mixed
All values must be given as constructor arguments. All strings should be localized.
Parameters
- $title : string
-
Status title, eg. "Deprecation log"
- $value : string
-
Status value, eg. "Disabled"
- $message : string = ''
-
Optional message further describing the title/value combination Example:, eg "The deprecation log is important and does foo, to disable it do bar"
- $severity : int = self::OK
-
A severity level. Use one of the constants above!
__toString()
Creates a string representation of a status.
public
__toString() : string
Return values
string —String representation of this status.
getMessage()
Gets the status' message (if any)
public
getMessage() : string
Return values
stringgetSeverity()
Gets the status' severity
public
getSeverity() : int
Return values
intgetTitle()
Gets the status' title
public
getTitle() : string
Return values
stringgetValue()
Gets the status' value
public
getValue() : string