b2evolution PHP Cross Reference Blogging Systems

Summary: /inc/_core/model/_messages.class.php - 295 lines - 6938 bytes - Source - Print

Description: This file implements the Messages class for displaying messages about performed actions. It additionally provides the class Log_noop that implements the same (used) methods, but as no-operation functions. This is useful to create a more resource friendly object when you don't need it (think Debuglog).

Author: blueyed: Daniel HAHLER
Author: fplanque: Francois PLANQUE
Copyright: (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}
Version: $Id: _messages.class.php 6136 2014-03-08 07:59:48Z manuel $ }}}
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Messages:: (8 methods):

Class: Messages

Messages class. For displaying notes, successful actions & errors.

clear()  line: 84
Clears messages content

add( $text, $type = 'error' )  line: 96
Add a message.

param: string the message
param: string the message type, it can have this values: 'success', 'warning', 'error', 'note'
add_messages( $p_Messages line: 114
Add a Messages object to this.

param: Messages object
disp( $before = '<div class="action_messages">', $after = '</div>' )  line: 134

The purpose here is to have a tag which is simple yet flexible.
the display function is WAAAY too bloated.

param: string HTML to display before the log when there is something to display
param: string HTML to display after the log when there is something to display
display( $head = NULL, $foot = NULL, $display = true, $outerdivclass = 'log_container' )  line: 165
Display messages of the object.

- You can output/get the messages
- Head/Foot will be displayed on top/bottom of the messages.
- You can suppress the outer div or set a css class for it (defaults to

return: boolean false, if no messages; else true (and outputs if $display)
param: string|NULL Header/title
param: string|NULL Footer
param: boolean to display or return (default: display)
param: mixed the outer div, may be false
get_string( $head = '', $foot = '', $implodeBy = ', ', $format = 'striptags' )  line: 228
Concatenates messages of a given category to a string

return: string the messages, imploded. Tags stripped.
param: string prefix of the string
param: string suffic of the string
param: string the glue
param: string result format
count()  line: 273
Get the number of messages

return: number of messages
has_errors()  line: 284
Has error message in current object

return: boolean true if error message was added, false otherwise