本文整理匯總了PHP中PMA_Message::rawNotice方法的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_Message::rawNotice方法的具體用法?PHP PMA_Message::rawNotice怎麽用?PHP PMA_Message::rawNotice使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PMA_Message
的用法示例。
在下文中一共展示了PMA_Message::rawNotice方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: addMessage
/**
* add another raw message to be concatenated on displaying
*
* @param mixed $message to be added
* @param string $separator to use between this and previous string/message
*
* @return void
*/
public function addMessage($message, $separator = ' ')
{
if (strlen($separator)) {
$this->addedMessages[] = $separator;
}
if ($message instanceof PMA_Message) {
$this->addedMessages[] = $message;
} else {
$this->addedMessages[] = PMA_Message::rawNotice($message);
}
}
示例2: testAddMessages
/**
* testing add messages method
*
* @return void
*/
public function testAddMessages()
{
$messages = array();
$messages[] = "Test1";
$messages[] = new PMA_Message("PMA_Test2", PMA_Message::ERROR);
$messages[] = "Test3";
$this->object->addMessages($messages, '');
$this->assertEquals(array(PMA_Message::rawNotice('Test1'), PMA_Message::error("PMA_Test2"), PMA_Message::rawNotice('Test3')), $this->object->getAddedMessages());
}