is*() methods now return boolean values;

some doc;
This commit is contained in:
Sebastian Mendel
2008-12-11 07:52:22 +00:00
parent 4230bfc595
commit 0a82c8ff13

View File

@@ -3,6 +3,7 @@
/** /**
* Holds class PMA_Message * Holds class PMA_Message
* *
* @author Sebastian Mendel <info@sebastianmendel.de>
* @version $Id: Error.class.php 10738 2007-10-08 16:02:58Z cybot_tm $ * @version $Id: Error.class.php 10738 2007-10-08 16:02:58Z cybot_tm $
* @package phpMyAdmin * @package phpMyAdmin
*/ */
@@ -27,23 +28,33 @@
* *
* more advanced usage example: * more advanced usage example:
* <code> * <code>
* // create a localized success message
* $message = PMA_Message::success('strSomeLocaleMessage'); * $message = PMA_Message::success('strSomeLocaleMessage');
* *
* // create another message, a hint, whith a localized string which expects
* // two parameters: $strSomeFootnote = 'Read the %smanual%s'
* $hint = PMA_Message::notice('strSomeFootnote'); * $hint = PMA_Message::notice('strSomeFootnote');
* // replace %d with the following params
* $hint->addParam('[a@./Documentation.html#cfg_Example@_blank]'); * $hint->addParam('[a@./Documentation.html#cfg_Example@_blank]');
* $hint->addParam('[/a]'); * $hint->addParam('[/a]');
* // add this hint as a footnote
* $hint = PMA_showHint($hint); * $hint = PMA_showHint($hint);
* *
* // add the retrieved footnote reference to the original message
* $message->addMessage($hint); * $message->addMessage($hint);
* *
* // create another message ...
* $more = PMA_Message::notice('strSomeMoreLocale'); * $more = PMA_Message::notice('strSomeMoreLocale');
* $more->addString('strSomeEvenMoreLocale', '<br />'); * $more->addString('strSomeEvenMoreLocale', '<br />');
* $more->addParam('parameter for strSomeMoreLocale'); * $more->addParam('parameter for strSomeMoreLocale');
* $more->addParam('more parameter for strSomeMoreLocale'); * $more->addParam('more parameter for strSomeMoreLocale');
* *
* // and add it also to the orignal message
* $message->addMessage($more); * $message->addMessage($more);
* // finally add another raw message
* $message->addMessage('some final words', ' - '); * $message->addMessage('some final words', ' - ');
* *
* // display() will now print all messages in the same order as they are added
* $message->display(); * $message->display();
* // strSomeLocaleMessage <sup>1</sup> strSomeMoreLocale<br /> * // strSomeLocaleMessage <sup>1</sup> strSomeMoreLocale<br />
* // strSomeEvenMoreLocale - some final words * // strSomeEvenMoreLocale - some final words
@@ -335,7 +346,7 @@ class PMA_Message
$this->setNumber(PMA_Message::SUCCESS); $this->setNumber(PMA_Message::SUCCESS);
} }
return $this->getNumber() & PMA_Message::SUCCESS; return $this->getNumber() === PMA_Message::SUCCESS;
} }
/** /**
@@ -354,7 +365,7 @@ class PMA_Message
$this->setNumber(PMA_Message::NOTICE); $this->setNumber(PMA_Message::NOTICE);
} }
return $this->getNumber() & PMA_Message::NOTICE; return $this->getNumber() === PMA_Message::NOTICE;
} }
/** /**
@@ -373,7 +384,7 @@ class PMA_Message
$this->setNumber(PMA_Message::WARNING); $this->setNumber(PMA_Message::WARNING);
} }
return $this->getNumber() & PMA_Message::WARNING; return $this->getNumber() === PMA_Message::WARNING;
} }
/** /**
@@ -392,7 +403,7 @@ class PMA_Message
$this->setNumber(PMA_Message::ERROR); $this->setNumber(PMA_Message::ERROR);
} }
return $this->getNumber() & PMA_Message::ERROR; return $this->getNumber() === PMA_Message::ERROR;
} }
/** /**
@@ -795,7 +806,7 @@ class PMA_Message
public function isDisplayed($is_displayed = false) public function isDisplayed($is_displayed = false)
{ {
if ($is_displayed) { if ($is_displayed) {
$this->_is_displayed = $is_displayed; $this->_is_displayed = true;
} }
return $this->_is_displayed; return $this->_is_displayed;