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

Method phpWebRootOf

src/resolution/index.ts:3608–3612  ·  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

3606 * php-web-root.ts), else null.
3607 */
3608 phpWebRootOf(fromFile: string): string | null {
3609 const configured = loadWebRoot(this.projectRoot);
3610 if (configured !== null) return configured;
3611 return this.inferredPhpWebRoots().get(folderOf(fromFile)) ?? null;
3612 }
3613
3614 /** Every folder holding a `$_SERVER['DOCUMENT_ROOT']` include → the web root inferred for it, read once a pass. */
3615 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