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