MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / get_document_links

Function get_document_links

tests/integration/document_links.rs:6–15  ·  view source on GitHub ↗

Helper: open a file in the backend and return its document links.

(
    backend: &phpantom_lsp::Backend,
    uri: &str,
    content: &str,
)

Source from the content-addressed store, hash-verified

4
5/// Helper: open a file in the backend and return its document links.
6fn get_document_links(
7 backend: &phpantom_lsp::Backend,
8 uri: &str,
9 content: &str,
10) -> Vec<DocumentLink> {
11 backend.update_ast(uri, content);
12 backend
13 .handle_document_link(uri, content)
14 .unwrap_or_default()
15}
16
17/// Helper: extract just the target URLs (as strings) from document links.
18fn link_targets(links: &[DocumentLink]) -> Vec<String> {

Calls 2

update_astMethod · 0.80
handle_document_linkMethod · 0.80

Tested by 15

include_string_literalFunction · 0.68
require_string_literalFunction · 0.68
require_once_dir_concatFunction · 0.68
require_once_dirname_dirFunction · 0.68
require_relative_pathFunction · 0.68