} final public static function newFromRepository( PhabricatorRepository $repository, $path = '/', $commit = null) { switch ($repository->getVersionControlSystem()) { case 'git': // TODO: Verify local-path? $class = 'DiffusionGitBrowseQuery'; break; default: throw new Exception("Unsupported VCS!"); } PhutilSymbolLoader::loadClass($class); $query = new $class(); $query->repository = $repository; $query->path = $path; $query->commit = $commit; return $query; } final protected function getRepository() { return $this->repository; } final protected function getPath() { return $this->path; } final protected function getCommit() { return $this->commit; } final public function getReasonForEmptyResultSet() { return $this->reason; } final public function loadPaths() { return $this->executeQuery(); } abstract protected function executeQuery(); }