本文整理匯總了PHP中DatabaseUpdater::verifyAndUpdatePlugins方法的典型用法代碼示例。如果您正苦於以下問題:PHP DatabaseUpdater::verifyAndUpdatePlugins方法的具體用法?PHP DatabaseUpdater::verifyAndUpdatePlugins怎麽用?PHP DatabaseUpdater::verifyAndUpdatePlugins使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DatabaseUpdater
的用法示例。
在下文中一共展示了DatabaseUpdater::verifyAndUpdatePlugins方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
if ($author_string == '') {
return $detectedAuthors;
}
// detecting known duplicates
foreach ($this->fpa_duplicates as $known_duplicate) {
foreach ($known_duplicate['names'] as $known_name) {
if (preg_match('/' . preg_quote($known_name, '/') . '/', $author_string)) {
$author_string = preg_replace('/' . preg_quote($known_name, '/') . '/', $known_duplicate['ends'], $author_string);
}
}
}
// detecting inline multiple authors
foreach ($this->fpa_separators as $separator) {
$found_authors = explode($separator, $author_string);
if (sizeof($found_authors) > 1) {
foreach ($found_authors as $author) {
$detectedAuthors[] = trim($author);
}
break;
}
}
if (sizeof($detectedAuthors) == 0) {
return [trim($author_string)];
} else {
return $detectedAuthors;
}
}
}
$db_updater = new DatabaseUpdater();
$db_updater->verifyAndUpdatePlugins();