本文整理匯總了PHP中PMA_Message::decodeBB方法的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_Message::decodeBB方法的具體用法?PHP PMA_Message::decodeBB怎麽用?PHP PMA_Message::decodeBB使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PMA_Message
的用法示例。
在下文中一共展示了PMA_Message::decodeBB方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getMessage
/**
* returns compiled message
*
* @return string complete message
*/
public function getMessage()
{
$message = $this->message;
if (0 === strlen($message)) {
$string = $this->getString();
if (isset($GLOBALS[$string])) {
$message = $GLOBALS[$string];
} elseif (0 === strlen($string)) {
$message = '';
} else {
$message = $string;
}
}
if ($this->isDisplayed()) {
$message = $this->getMessageWithIcon($message);
}
if (count($this->getParams()) > 0) {
$message = PMA_Message::format($message, $this->getParams());
}
$message = PMA_Message::decodeBB($message);
foreach ($this->getAddedMessages() as $add_message) {
$message .= $add_message;
}
return $message;
}
示例2: trigger_error
*/
if (!@extension_loaded('mbstring')) {
trigger_error(__('The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.'), E_USER_WARNING);
}
/**
* Check whether session.gc_maxlifetime limits session validity.
*/
$gc_time = (int) @ini_get('session.gc_maxlifetime');
if ($gc_time < $GLOBALS['cfg']['LoginCookieValidity']) {
trigger_error(PMA_Message::decodeBB(__('Your PHP parameter [a@http://php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime@]session.gc_maxlifetime[/a] is lower that cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.')), E_USER_WARNING);
}
/**
* Check whether LoginCookieValidity is limited by LoginCookieStore.
*/
if ($GLOBALS['cfg']['LoginCookieStore'] != 0 && $GLOBALS['cfg']['LoginCookieStore'] < $GLOBALS['cfg']['LoginCookieValidity']) {
trigger_error(PMA_Message::decodeBB(__('Login cookie store is lower than cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.')), E_USER_WARNING);
}
/**
* Check if user does not have defined blowfish secret and it is being used.
*/
if (!empty($_SESSION['auto_blowfish_secret']) && empty($GLOBALS['cfg']['blowfish_secret'])) {
trigger_error(__('The configuration file now needs a secret passphrase (blowfish_secret).'), E_USER_WARNING);
}
/**
* Check for existence of config directory which should not exist in
* production environment.
*/
if (file_exists('./config')) {
trigger_error(__('Directory [code]config[/code], which is used by the setup script, still exists in your phpMyAdmin directory. You should remove it once phpMyAdmin has been configured.'), E_USER_WARNING);
}
/**
示例3: trigger_error
if (@extension_loaded('mbstring') && @ini_get('mbstring.func_overload') > 1) {
trigger_error($strMbOverloadWarning, E_USER_WARNING);
}
/**
* Nijel: mbstring is used for handling multibyte inside parser, so it is good
* to tell user something might be broken without it, see bug #1063149.
*/
if (!@extension_loaded('mbstring')) {
trigger_error($strMbExtensionMissing, E_USER_WARNING);
}
/**
* Check whether session.gc_maxlifetime limits session validity.
*/
$gc_time = (int) @ini_get('session.gc_maxlifetime');
if ($gc_time < $GLOBALS['cfg']['LoginCookieValidity']) {
trigger_error(PMA_Message::decodeBB($strSessionGCWarning), E_USER_WARNING);
}
/**
* Check if user does not have defined blowfish secret and it is being used.
*/
if (!empty($_SESSION['auto_blowfish_secret']) && empty($GLOBALS['cfg']['blowfish_secret'])) {
trigger_error($strSecretRequired, E_USER_WARNING);
}
/**
* Check for existence of config directory which should not exist in
* production environment.
*/
if (file_exists('./config')) {
trigger_error($strConfigDirectoryWarning, E_USER_WARNING);
}
/**
示例4: testDecodeBB
/**
* testing decodeBB method
*
* @param string $actual BB code string
* @param string $expected Expected decoded string
*
* @return void
*
* @dataProvider decodeBBDataProvider
*/
public function testDecodeBB($actual, $expected)
{
unset($GLOBALS['server']);
unset($GLOBALS['collation_connection']);
$this->assertEquals($expected, PMA_Message::decodeBB($actual));
}
示例5: testDecodeBB
/**
* testing decodeBB method
* @dataProvider decodeBBDataProvider
*/
public function testDecodeBB($actual, $expected)
{
$GLOBALS['lang'] = 'en';
$this->assertEquals($expected, PMA_Message::decodeBB($actual));
}
示例6: testDecodeBB
/**
* testing decodeBB method
*
* @param string $actual BB code string
* @param string $expected Expected decoded string
*
* @dataProvider decodeBBDataProvider
*/
public function testDecodeBB($actual, $expected)
{
$GLOBALS['lang'] = 'en';
$_SESSION[' PMA_token '] = 'token';
unset($GLOBALS['server']);
$this->assertEquals($expected, PMA_Message::decodeBB($actual));
}