本文整理汇总了PHP中DifferentialDiff::loadAllWhere方法的典型用法代码示例。如果您正苦于以下问题:PHP DifferentialDiff::loadAllWhere方法的具体用法?PHP DifferentialDiff::loadAllWhere怎么用?PHP DifferentialDiff::loadAllWhere使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DifferentialDiff
的用法示例。
在下文中一共展示了DifferentialDiff::loadAllWhere方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadDiffs
private function loadDiffs(array $revisions)
{
if (!$revisions) {
return array();
}
$diff_teml = new DifferentialDiff();
$diffs = $diff_teml->loadAllWhere('revisionID in (%Ld)', array_keys($revisions));
return $diffs;
}
示例2: loadActiveDiffs
private function loadActiveDiffs($conn_r, array $revisions)
{
assert_instances_of($revisions, 'DifferentialRevision');
$diff_table = new DifferentialDiff();
$load_ids = array();
foreach ($revisions as $revision) {
$diffs = $revision->getDiffIDs();
if ($diffs) {
$load_ids[] = max($diffs);
}
}
$active_diffs = array();
if ($load_ids) {
$active_diffs = $diff_table->loadAllWhere('id IN (%Ld)', $load_ids);
}
$active_diffs = mpull($active_diffs, null, 'getRevisionID');
foreach ($revisions as $revision) {
$revision->attachActiveDiff(idx($active_diffs, $revision->getID()));
}
}