MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / getPhpDocumentRootIncludes

Method getPhpDocumentRootIncludes

src/db/queries.ts:1777–1784  ·  view source on GitHub ↗

* The PHP includes built from `$_SERVER['DOCUMENT_ROOT']` (#3298): the import * nodes the extractors name `prefix` + the path appended to the web root, * each with its file. By index range scan, ordered for a stable reading.

(prefix: string)

Source from the content-addressed store, hash-verified

1775 * each with its file. By index range scan, ordered for a stable reading.
1776 */
1777 getPhpDocumentRootIncludes(prefix: string): Array<{ filePath: string; name: string }> {
1778 if (!this.stmts.getPhpDocumentRootIncludes) {
1779 this.stmts.getPhpDocumentRootIncludes = this.db.prepare(
1780 "SELECT file_path AS filePath, name FROM nodes WHERE name >= ? AND name < ? AND kind = 'import' AND language = 'php' ORDER BY name, file_path"
1781 );
1782 }
1783 return this.stmts.getPhpDocumentRootIncludes.all(prefix, prefix + '￿') as Array<{ filePath: string; name: string }>;
1784 }
1785
1786 /** File nodes whose basename starts with `prefix`, without a result cap. */
1787 getFileNodesByNamePrefix(prefix: string): Node[] {

Callers 1

inferredPhpWebRootsMethod · 0.80

Calls 2

prepareMethod · 0.65
allMethod · 0.65

Tested by

no test coverage detected