src/Server/Workspace.php
public function symbol(string $query): Promise
    {
        return coroutine(function () use ($query) {
            // Wait until indexing for definitions finished
            if (!$this->sourceIndex->isStaticComplete()) {
                yield waitForEvent($this->sourceIndex, 'static-complete');
            }
            $symbols = [];
            foreach ($this->sourceIndex->getDefinitions() as $fqn => $definition) {
                if ($query === '' || stripos($fqn, $query) !== false) {
                    $symbols[] = $definition->symbolInformation;
                }
            }
            return $symbols;
        });
    }
public function symbol(string $query): Promise
    {
        return coroutine(function () use ($query) {
            // Wait until indexing for definitions finished
            if (!$this->sourceIndex->isStaticComplete()) {
                yield waitForEvent($this->sourceIndex, 'static-complete');
            }
            $symbols = [];
            foreach ($this->sourceIndex->getDefinitions() as $fqn => $definition) {
                if ($query === '' || stripos($fqn, $query) !== false) {
                    $symbols[] = $definition->symbolInformation;
                }
            }
            return $symbols;
        });
    }
public function symbol ( string $ query ) : Promise { return coroutine ( function ( ) use ( $ query ) { // Wait until indexing for definitions finished if ( ! $ this -> sourceIndex -> isStaticComplete ( ) ) { yield waitForEvent ( $ this -> sourceIndex , 'static-complete' ) ; } $ symbols = [ ] ; foreach ( $ this -> sourceIndex -> getDefinitions ( ) as $ fqn => $ definition ) { if ( $ query === '' || stripos ( $ fqn , $ query ) !== false ) { $ symbols [ ] = $ definition -> symbolInformation ; } } return $ symbols ; } ) ; }
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 Promise <SymbolInformation[]>
The workspace symbol request is sent from the client to the server to list project - wide symbols matching the query string .