added more shorthands

This commit is contained in:
Sebastian Mendel
2007-10-15 11:36:48 +00:00
parent 608da592da
commit 9993ca8f47

View File

@@ -145,7 +145,25 @@ class PMA_Message
return new PMA_Message($string, PMA_Message::ERROR);
}
return PMA_Message::raw($string, PMA_Message::ERROR);
return PMA_Message::rawError($string);
}
static public function warning($string)
{
if (substr($string, 0, 3) === 'str') {
return new PMA_Message($string, PMA_Message::WARNING);
}
return PMA_Message::raw($string, PMA_Message::WARNING);
}
static public function notice($string)
{
if (substr($string, 0, 3) === 'str') {
return new PMA_Message($string, PMA_Message::NOTICE);
}
return PMA_Message::raw($string, PMA_Message::NOTICE);
}
static public function raw($message, $type = PMA_Message::NOTICE)
@@ -155,6 +173,11 @@ class PMA_Message
return $r;
}
static public function rawError($message)
{
return PMA_Message::raw($message, PMA_Message::ERROR);
}
public function isSuccess($set = false)
{
if ($set) {