_arrMessageTypes = array(
"status" => array("text" => "Status", "cssClass" => $this->_phpMessageStatusCssClass),
"hint" => array("text" => "Hint", "cssClass" => $this->_phpMessageHintCssClass),
"error" => array("text" => "Error", "cssClass" => $this->_phpMessageErrorCssClass)
);
}
/**
* addMessage:
*
* @author Stefan Dressler
* @version 0.1, 2007-01-19
* @param $type String
* @param $section String
* @param $msgText String
* @param $attributes String
*/
public function addMessage($type = "status", $section = "", $msgText = "", $attributes = "")
{
// fehler bei unbekanntem typ
if(!is_array($this->_arrMessageTypes[$type])) { echo 'addMessage: unknown type: "'.$type.'"!'; return false; }
// fehler bei leerer Nachricht
if(empty($msgText)) { echo "addMessage: empty message text!"; return false; }
// message-array fuellen
$this->_arrMessages[$type][] = array("type" => $this->_arrMessageTypes[$type], "section" => $section, "msgText" => $msgText, "attributes" => $attributes);
return true;
}
/**
* returnMessage:
*
* @author Stefan Dressler
* @version 0.1, 2007-01-19
* @param $key Array
*/
protected function returnMessage($key)
{
if(!is_array($key)) { echo "returnMessage: parameter is not an array!
"; return false; } else {
$_message = ''."\n";
$_message .= '