Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/symbol/DiffusionExternalSymbolsSource.php
- This file was added.
<?php | |||||
abstract class DiffusionExternalSymbolsSource { | |||||
epriestley: You could also just put these methods on `DiffusionExternalSymbolQuery` and have the sources… | |||||
/** | |||||
Not Done Inline ActionsI'd rather keep Query separate from the Source/Engine. avivey: I'd rather keep `Query` separate from the `Source`/`Engine`. | |||||
* @return list of PhabricatorRepositorySymbol | |||||
*/ | |||||
abstract public function executeQuery(DiffusionExternalSymbolQuery $query); | |||||
Done Inline ActionsMaybe "lookupSymbols" since we return a list of matches now. Or executeQuery()? epriestley: Maybe "lookupSymbol**s**" since we return a list of matches now. Or `executeQuery()`? | |||||
protected function buildExternalSymbol() { | |||||
Not Done Inline ActionsexecuteQuery sounds good. avivey: `executeQuery` sounds good. | |||||
return id(new PhabricatorRepositorySymbol()) | |||||
->setIsExternal(true) | |||||
->makeEphemeral(); | |||||
} | |||||
} | |||||
Not Done Inline ActionsI'll replace this with protected function buildExternalSymbol() { return id(new PhabricatorRepositorySymbol()) ->setIsExternal(true) ->makeEphemeral(); } avivey: I'll replace this with
```lang=php
protected function buildExternalSymbol() {
return id(new… |
You could also just put these methods on DiffusionExternalSymbolQuery and have the sources subclass that, although I'm not really sure if that's cleaner/simpler. This design feels about equally good to me.