本文整理汇总了PHP中LogFormatter::getMessageKey方法的典型用法代码示例。如果您正苦于以下问题:PHP LogFormatter::getMessageKey方法的具体用法?PHP LogFormatter::getMessageKey怎么用?PHP LogFormatter::getMessageKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LogFormatter
的用法示例。
在下文中一共展示了LogFormatter::getMessageKey方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMessageKey
protected function getMessageKey() {
$key = parent::getMessageKey();
$params = $this->getMessageParameters();
if ( isset( $params[4] ) && $params[4] === '1' ) {
$key .= '-noredirect';
}
return $key;
}
示例2: getMessageKey
protected function getMessageKey() {
$key = parent::getMessageKey();
$params = $this->getMessageParameters();
if ( !isset( $params[3] ) && !isset( $params[4] ) ) {
$key .= '-legacy';
}
return $key;
}
示例3: getMessageKey
protected function getMessageKey() {
$key = parent::getMessageKey();
$params = $this->getMessageParameters();
if ( isset( $params[5] ) && $params[5] ) {
$key .= '-auto';
}
return $key;
}
示例4: getMessageKey
protected function getMessageKey() {
$key = parent::getMessageKey();
if ( in_array( $this->entry->getSubtype(), array( 'event', 'revision' ) ) ) {
if ( count( $this->getMessageParameters() ) < 5 ) {
return "$key-legacy";
}
}
return $key;
}
示例5: getMessageKey
protected function getMessageKey()
{
$key = parent::getMessageKey();
$params = $this->extractParameters();
if (isset($params[4]) && $params[4] === '1') {
// Messages: logentry-move-move-noredirect, logentry-move-move_redir-noredirect
$key .= '-noredirect';
}
return $key;
}
示例6: getMessageKey
protected function getMessageKey()
{
$key = parent::getMessageKey();
$params = $this->extractParameters();
if (isset($params[4]) && $params[4]) {
// Messages: logentry-protect-protect-cascade, logentry-protect-modify-cascade
$key .= '-cascade';
}
return $key;
}
示例7: getMessageKey
protected function getMessageKey()
{
$key = parent::getMessageKey();
$params = $this->extractParameters();
if (isset($params[3])) {
// New log items with more details
// Messages: logentry-import-upload-details, logentry-import-interwiki-details
$key .= '-details';
}
return $key;
}
示例8: getMessageKey
public function getMessageKey()
{
$key = parent::getMessageKey();
$params = $this->extractParameters();
// Very old log format, everything in comment
if (!isset($params[3])) {
return "{$key}-legaciest";
} elseif (!isset($params[5])) {
return "{$key}-legacier";
}
return $key;
}
示例9: getMessageKey
protected function getMessageKey()
{
$key = parent::getMessageKey();
if (in_array($this->entry->getSubtype(), ['event', 'revision'])) {
if (count($this->getMessageParameters()) < 5) {
// Messages: logentry-delete-event-legacy, logentry-delete-revision-legacy,
// logentry-suppress-event-legacy, logentry-suppress-revision-legacy
return "{$key}-legacy";
}
}
return $key;
}
示例10: getMessageKey
protected function getMessageKey()
{
$key = parent::getMessageKey();
$params = $this->getMessageParameters();
$add = isset($params[6]) && isset($params[6]['num']) && $params[6]['num'];
$remove = isset($params[8]) && isset($params[8]['num']) && $params[8]['num'];
$key .= $remove ? $add ? '' : '-remove' : '-add';
if (isset($params[3]) && $params[3]) {
$key .= '-revision';
} else {
$key .= '-logentry';
}
return $key;
}
示例11: getMessageKey
protected function getMessageKey()
{
$key = parent::getMessageKey();
$type = $this->entry->getFullType();
if ($type === 'pagetranslation/prioritylanguages') {
$params = $this->getMessageParameters();
if (!isset($params[4])) {
$key .= '-unset';
} elseif ($params['3'] === 'on') {
$key .= '-force';
}
}
return $key;
}