Ejemplo n.º 1
0
 private function loadSymbolForAtom(DivinerAtom $atom)
 {
     $symbol = id(new DivinerAtomQuery())->setViewer(PhabricatorUser::getOmnipotentUser())->withBookPHIDs(array($this->loadBook()->getPHID()))->withTypes(array($atom->getType()))->withNames(array($atom->getName()))->withContexts(array($atom->getContext()))->withIndexes(array($this->getAtomSimilarIndex($atom)))->withIncludeUndocumentable(true)->withIncludeGhosts(true)->executeOne();
     if ($symbol) {
         return $symbol;
     }
     return id(new DivinerLiveSymbol())->setBookPHID($this->loadBook()->getPHID())->setType($atom->getType())->setName($atom->getName())->setContext($atom->getContext())->setAtomIndex($this->getAtomSimilarIndex($atom));
 }
Ejemplo n.º 2
0
 protected function getAtomHrefDepth(DivinerAtom $atom)
 {
     if ($atom->getContext()) {
         return 4;
     } else {
         return 3;
     }
 }