2011-04-11 03:02:19 -07:00
|
|
|
<?php
|
|
|
|
|
2013-12-31 11:08:08 -08:00
|
|
|
final class DiffusionCommitRemarkupRule
|
2013-02-27 08:04:54 -08:00
|
|
|
extends PhabricatorRemarkupRuleObject {
|
2011-04-11 03:02:19 -07:00
|
|
|
|
2012-12-12 13:46:28 -08:00
|
|
|
protected function getObjectNamePrefix() {
|
2013-02-27 08:04:54 -08:00
|
|
|
return '';
|
2011-04-11 03:02:19 -07:00
|
|
|
}
|
|
|
|
|
2013-05-20 13:27:03 -07:00
|
|
|
protected function getObjectNamePrefixBeginsWithWordCharacter() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2012-12-12 13:46:28 -08:00
|
|
|
protected function getObjectIDPattern() {
|
2013-07-21 10:57:07 -07:00
|
|
|
return PhabricatorRepositoryPHIDTypeCommit::getCommitObjectNamePattern();
|
2013-02-27 08:04:54 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
protected function loadObjects(array $ids) {
|
|
|
|
$viewer = $this->getEngine()->getConfig('viewer');
|
|
|
|
|
2013-07-21 10:57:07 -07:00
|
|
|
$query = id(new DiffusionCommitQuery())
|
2013-02-27 08:04:54 -08:00
|
|
|
->setViewer($viewer)
|
2013-07-21 10:57:07 -07:00
|
|
|
->withIdentifiers($ids);
|
2013-02-27 08:04:54 -08:00
|
|
|
|
2013-07-21 10:57:07 -07:00
|
|
|
$query->execute();
|
2013-02-27 08:04:54 -08:00
|
|
|
|
2013-07-21 10:57:07 -07:00
|
|
|
return $query->getIdentifierMap();
|
2011-04-11 03:02:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|