project = $project; $this->client = $client; } /** * The workspace symbol request is sent from the client to the server to list project-wide symbols matching the query string. * * @param string $query * @return SymbolInformation[] */ public function symbol(string $query): array { $symbols = []; foreach ($this->project->getDefinitionUris() as $fqn => $uri) { if ($query === '' || stripos($fqn, $query) !== false) { $symbols[] = SymbolInformation::fromNode($this->project->getDocument($uri)->getDefinitionByFqn($fqn), $fqn); } } return $symbols; } }