[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/search/index/ -> PhabricatorSearchIndexer.php (source)

   1  <?php
   2  
   3  final class PhabricatorSearchIndexer {
   4  
   5    public function queueDocumentForIndexing($phid) {
   6      PhabricatorWorker::scheduleTask(
   7        'PhabricatorSearchWorker',
   8        array(
   9          'documentPHID' => $phid,
  10        ),
  11        PhabricatorWorker::PRIORITY_IMPORT);
  12    }
  13  
  14    public function indexDocumentByPHID($phid) {
  15      $indexers = id(new PhutilSymbolLoader())
  16        ->setAncestorClass('PhabricatorSearchDocumentIndexer')
  17        ->loadObjects();
  18  
  19      foreach ($indexers as $indexer) {
  20        if ($indexer->shouldIndexDocumentByPHID($phid)) {
  21          $indexer->indexDocumentByPHID($phid);
  22          break;
  23        }
  24      }
  25  
  26      return $this;
  27    }
  28  
  29  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1