本文整理汇总了PHP中PEAR_PackageFile_v2::getChangelog方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_PackageFile_v2::getChangelog方法的具体用法?PHP PEAR_PackageFile_v2::getChangelog怎么用?PHP PEAR_PackageFile_v2::getChangelog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEAR_PackageFile_v2
的用法示例。
在下文中一共展示了PEAR_PackageFile_v2::getChangelog方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* Creates a changelog entry with the current release
* notes and dates, or overwrites a previous creation
*
* @return void
* @access private
* @since 1.6.0a1
*/
function _updateChangeLog()
{
if ($this->_oldPackageFile) {
$changelog = $this->_oldPackageFile->getChangelog();
} else {
$changelog = false;
}
$notes = $this->_options['changelognotes'];
if (!$changelog) {
$this->setChangelogEntry($this->getVersion(), $this->generateChangeLogEntry($notes));
return;
} else {
if (!isset($changelog['release'][0])) {
$changelog['release'] = array($changelog['release']);
}
$found = false;
foreach ($changelog['release'] as $i => $centry) {
$changelog['release'][$i]['notes'] = trim($changelog['release'][$i]['notes']);
if ($centry['version']['release'] == $this->getVersion()) {
$changelog['release'][$i] = $this->generateChangeLogEntry($notes);
$found = true;
}
}
if (!$found) {
$changelog['release'][] = $this->generateChangeLogEntry($notes);
}
usort($changelog['release'], array($this, '_changelogsort'));
$this->clearChangeLog();
foreach ($changelog['release'] as $entry) {
$this->setChangelogEntry($entry['version']['release'], $entry);
}
}
}