lib/status.inc

Properties

Description

LDAP Account Manager status messages.

Functions

StatusMessage( string   $MessageTyp, string   $MessageHeadline, string   $MessageText = '', array   $MessageVariables = array(), boolean   $returnOutput = false, ) : String

Description

This function prints a short status message. It can be used to print INFO, WARN and ERROR messages at the moment.
The headline and text may be formated with special tags:

{bold}, {endbold}: All text between these tags is printed bold.
{color=#123456}, {endcolor}: All text between these tags is printed in the given color.
{link=http://nodomain.org}, {endlink}: A link with the given target is created. The link text is the text between the tags.

Arguments

Name Type Description Default
$MessageTyp string

The type of the message to be printed. It must be one of the following types: 'INFO', 'WARN' or 'ERROR'.
Every other type will lead to an error message indicating an invalid message type.

$MessageHeadline string

The headline of the status message.
It may be formatted with special color/link/bold tags.

$MessageText string

The text of the status message.
It may be formatted with special color/link/bold tags. This parameter is optional.

''
$MessageVariables array

The variables that are used to replace the spacers (%s) in the submitted text. This parameter is optional.

array()
$returnOutput boolean

if set to true this function will return the generated HTML code instead of printing it directly (default: false)

false

Return value

Type Description
String HTML code if $returnOutput is set to true, otherwise null

parseMessageString( string   $MessageString, ) : string

Description

Use the three replace functions on the submitted Text.

Arguments

Name Type Description Default
$MessageString string

The text that is used to search for replaceable strings.

Return value

Type Description
string The processed text.

Tags

Name Description
access private

boldText( string   $text, ) : string

Description

Replace {bold} and {endbold} with and HTML-Tags.

Arguments

Name Type Description Default
$text string

The text that is used to search for {bold} and {endbold} tags.

Return value

Type Description
string The submitted text with {bold} and {endbold} replaced with the appropriate HTML tages <b> and </b>

Tags

Name Description
access private

colorText( string   $text, ) : string

Description

Replace {color=#[HEX-Value]} or {color=[HEX-Value]} and {endcolor} with and HTML-Tags.

Arguments

Name Type Description Default
$text string

The text that is used to search for {color} and {endcolor} tags.

Return value

Type Description
string Input string with HTML-formatted color tags

Tags

Name Description
access private

linkText( string   $text, ) : string

Description

Replace {link=[Link-Target]} and {endlink} with and HTML-Tags.

Arguments

Name Type Description Default
$text string

The text that is used to search for {link} and {endlink} tags.

Return value

Type Description
string Input string with HTML-formatted link tags

Tags

Name Description
access private
Documentation was generated by phpDocumentor 2.0.1 .

Namespaces

  • global

    Packages