コード例 #1
0
ファイル: Grapher.php プロジェクト: sourcegraph/srclib-php
 protected function parse(SourceUnit $unit)
 {
     $result = [];
     foreach ($unit->getFiles() as $filename) {
         $result[$filename] = $this->parseFile($unit, $filename);
     }
     return $result;
 }
コード例 #2
0
 protected function createTarget(SourceUnit $unit, $package)
 {
     return ['ToRepoCloneURL' => $unit->getRepository($package), 'ToUnit' => $package, 'ToUnitType' => $unit->getType(), 'ToVersionString' => $unit->getRequiredVersion($package), 'ToRevSpec' => $unit->getCommit($package)];
 }
コード例 #3
0
 protected function applyGlobal(array &$ref, Node $node, SourceUnit $unit, $filename, $test)
 {
     $ref['DefUnit'] = $unit->getPackageName($ref['DefPath']);
     $ref['DefUnitType'] = $unit->getType();
     $ref['DefRepo'] = $unit->getRepository($ref['DefUnit']);
     $ref['File'] = $filename;
     $ref['Start'] = $node->getAttribute('startFilePos');
     $ref['End'] = $node->getAttribute('endFilePos');
 }