Status

A class representing a certain status

Table of Contents

Constants

ERROR  = 2
INFO  = -1
NOTICE  = -2
OK  = 0
WARNING  = 1

Properties

$message  : string
$severity  : int
$title  : string
$value  : string

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

Properties

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
string

getSeverity()

Gets the status' severity

public getSeverity() : int
Return values
int

getTitle()

Gets the status' title

public getTitle() : string
Return values
string

getValue()

Gets the status' value

public getValue() : string
Return values
string

        
On this page

Search results