Documentation

Notifier
in package
implements Iterator

A class for user notifications.

It contains a stack of notifications that can be rendered at once. Alternatively a Notification is rendered and returned as soon as added.

We have four levels of severity: info, notice, warning, error

Table of Contents

Interfaces

Iterator

Methods

__construct()  : mixed
Constructs a Notifier Object
__destruct()  : mixed
add()  : mixed
adds a notification to the stack and returns it rendered
current()  : mixed
error()  : mixed
adds a notification of type error to the stack and returns it rendered
info()  : mixed
adds a notification of type info to the stack and returns it rendered
key()  : mixed
next()  : mixed
notice()  : mixed
adds a notification of type notice to the stack and returns it rendered
render()  : mixed
Returns the rendered Notifications
rewind()  : mixed
valid()  : mixed
warning()  : mixed
adds a notification of type warning to the stack and returns it rendered

Methods

__construct()

Constructs a Notifier Object

public __construct(mixed $renderer) : mixed
Parameters
$renderer : mixed

__destruct()

public __destruct() : mixed

add()

adds a notification to the stack and returns it rendered

public add(string $msg[, string $type = 'info' ]) : mixed
Parameters
$msg : string

The Notification message to be shown to the User

$type : string = 'info'

The Notification Level. One of: info, notice, warning or error

error()

adds a notification of type error to the stack and returns it rendered

public error(string $msg) : mixed
Parameters
$msg : string

The Notification message to be shown to the User

info()

adds a notification of type info to the stack and returns it rendered

public info(string $msg) : mixed
Parameters
$msg : string

The Notification message to be shown to the User

notice()

adds a notification of type notice to the stack and returns it rendered

public notice(string $msg) : mixed
Parameters
$msg : string

The Notification message to be shown to the User

render()

Returns the rendered Notifications

public render([mixed $type = null ][, mixed $renderer = null ]) : mixed
Parameters
$type : mixed = null
$renderer : mixed = null

warning()

adds a notification of type warning to the stack and returns it rendered

public warning(string $msg) : mixed
Parameters
$msg : string

The Notification message to be shown to the User


        
On this page

Search results