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

Method phpWebRootOf

src/resolution/index.ts:3536–3540  ·  view source on GitHub ↗

* The folder `$_SERVER['DOCUMENT_ROOT']` names for a PHP include in * `fromFile` (#3298): the project's `codegraph.json` `webRoot`, else the one * the project's own includes agree on for the file's folder (see * php-web-root.ts), else null.

(fromFile: string)

Source from the content-addressed store, hash-verified

3534 * php-web-root.ts), else null.
3535 */
3536 phpWebRootOf(fromFile: string): string | null {
3537 const configured = loadWebRoot(this.projectRoot);
3538 if (configured !== null) return configured;
3539 return this.inferredPhpWebRoots().get(folderOf(fromFile)) ?? null;
3540 }
3541
3542 /** Every folder holding a `$_SERVER['DOCUMENT_ROOT']` include → the web root inferred for it, read once a pass. */
3543 private inferredPhpWebRoots(): Map<string, string | null> {

Callers 1

createContextMethod · 0.95

Calls 4

inferredPhpWebRootsMethod · 0.95
loadWebRootFunction · 0.90
folderOfFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected