本文整理汇总了PHP中PMA_Message::addMessages方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Message::addMessages方法的具体用法?PHP PMA_Message::addMessages怎么用?PHP PMA_Message::addMessages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA_Message
的用法示例。
在下文中一共展示了PMA_Message::addMessages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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());
}
示例2: unset
}
}
}
if (isset($result)) {
// set to success by default, because result set could be empty
// (for example, a table rename)
$_type = 'success';
if (empty($_message)) {
$_message = $result ? __('Your SQL query has been executed successfully') : __('Error');
// $result should exist, regardless of $_message
$_type = $result ? 'success' : 'error';
}
if (! empty($warning_messages)) {
$_message = new PMA_Message;
$_message->addMessages($warning_messages);
$_message->isError(true);
unset($warning_messages);
}
PMA_showMessage($_message, $sql_query, $_type, $is_view = true);
unset($_message, $_type);
}
$url_params['goto'] = 'view_operations.php';
$url_params['back'] = 'view_operations.php';
/**
* Displays the page
*/
?>
<!-- Table operations -->