Documentation

SystemStatus
in package
implements NotificationInterface

SystemStatus notification.

This notification can be used to indicate to the user that the system is down.

Tags
copyright

Copyright (C) fruux GmbH (https://fruux.com/)

author

Evert Pot (http://evertpot.com/)

license

http://sabre.io/license/ Modified BSD License

Interfaces, Classes and Traits

NotificationInterface
This interface reflects a single notification type.

Table of Contents

TYPE_HIGH  = 3
TYPE_LOW  = 1
TYPE_MEDIUM  = 2
$description  : string
A human-readable description of the problem.
$etag  : string
Notification Etag.
$href  : string
A url to a website with more information for the user.
$id  : string
A unique id.
$type  : int
The type of alert. This should be one of the TYPE_ constants.
__construct()  : mixed
Creates the notification.
getETag()  : string
Returns the ETag for this notification.
getId()  : string
Returns a unique id for this notification.
xmlSerialize()  : mixed
The serialize method is called during xml writing.
xmlSerializeFull()  : mixed
This method serializes the entire notification, as it is used in the response body.

Constants

Properties

$description

A human-readable description of the problem.

protected string $description

$href

A url to a website with more information for the user.

protected string $href

$type

The type of alert. This should be one of the TYPE_ constants.

protected int $type

Methods

__construct()

Creates the notification.

public __construct(string $id, string $etag[, int $type = self::TYPE_HIGH ][, string $description = null ][, string $href = null ]) : mixed

Some kind of unique id should be provided. This is used to generate a url.

Parameters
$id : string
$etag : string
$type : int = self::TYPE_HIGH
$description : string = null
$href : string = null
Return values
mixed

getETag()

Returns the ETag for this notification.

public getETag() : string

The ETag must be surrounded by literal double-quotes.

Return values
string

getId()

Returns a unique id for this notification.

public getId() : string

This is just the base url. This should generally be some kind of unique id.

Return values
string

xmlSerialize()

The serialize method is called during xml writing.

public xmlSerialize(Writer $writer) : mixed

It should use the $writer argument to encode this object into XML.

Important note: it is not needed to create the parent element. The parent element is already created, and we only have to worry about attributes, child elements and text (if any).

Important note 2: If you are writing any new elements, you are also responsible for closing them.

Parameters
$writer : Writer
Return values
mixed

xmlSerializeFull()

This method serializes the entire notification, as it is used in the response body.

public xmlSerializeFull(Writer $writer) : mixed
Parameters
$writer : Writer
Return values
mixed

Search results