PHP Класс Basecoat\Messages

Автор: Brent Baisley ([email protected])
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$tpl_file Template file to use for message output

Открытые методы

Метод Описание
__construct ( ) : Object Create an instance of the Message class
clear ( String $msg_type = null ) : integer Clear all currently loaded messages
display ( $view, boolean $clear = true ) : integer Add current messages to the page for output
error ( $message ) Add an error type message to output
get ( String $msg_type = null ) : Array Get currently loaded messages Optionally filter on message type
info ( $message ) Add an information type message to output
setTemplate ( String $tpl_file ) Set the template file to use for message output
warn ( $message ) Add an warning type message to output

Защищенные методы

Метод Описание
add ( String $type, String $message ) : integer Add a message of the specified type

Описание методов

__construct() публичный Метод

Create an instance of the Message class
public __construct ( ) : Object
Результат Object instance of Message class

add() защищенный Метод

Messages are stored in the SESSION so they persist until they are outputted to the page
protected add ( String $type, String $message ) : integer
$type String message type to add
$message String message to add
Результат integer current number of messages of the specified type

clear() публичный Метод

Clear all currently loaded messages
public clear ( String $msg_type = null ) : integer
$msg_type String optionally clear only messages of specified type (default is to clear all)
Результат integer number of messages cleared

display() публичный Метод

Add current messages to the page for output
public display ( $view, boolean $clear = true ) : integer
$clear boolean clear messages after added to output
Результат integer number of messages added to output

error() публичный Метод

Add an error type message to output
public error ( $message )

get() публичный Метод

Get currently loaded messages Optionally filter on message type
public get ( String $msg_type = null ) : Array
$msg_type String message type to return (info, warn, error)
Результат Array list of currently loaded messages

info() публичный Метод

Add an information type message to output
public info ( $message )

setTemplate() публичный Метод

Set the template file to use for message output
public setTemplate ( String $tpl_file )
$tpl_file String path to the template file to load

warn() публичный Метод

Add an warning type message to output
public warn ( $message )

Описание свойств

$tpl_file защищенное свойство

Template file to use for message output
protected $tpl_file