3 abstract class DiffusionLowLevelQuery
extends Phobject
{
7 abstract protected function executeQuery();
9 public function setRepository(PhabricatorRepository
$repository) {
10 $this->repository
= $repository;
14 public function getRepository() {
15 return $this->repository
;
18 public function execute() {
19 if (!$this->getRepository()) {
20 throw new PhutilInvalidStateException('setRepository');
23 return $this->executeQuery();
26 protected function filterRefsByType(array $refs, array $types) {
27 $type_map = array_fuse($types);
29 foreach ($refs as $name => $ref_list) {
30 foreach ($ref_list as $key => $ref) {
31 if (empty($type_map[$ref['type']])) {
32 unset($refs[$name][$key]);