* 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)
| 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[] { |
no test coverage detected