Documentation
¶
Overview ¶
Package list builds a markdown inventory of PHP routes, files and classes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandFiles ¶
ExpandFiles resolves path arguments to a sorted list of PHP file paths. Path forms match Go's package patterns:
- "." or "dir": .php/.phpt files in that directory only (non-recursive)
- "./..." or "dir/...": that directory and all subdirectories
- "file.php": that file
When paths is empty, "." is used.
func StdlibMarkdown ¶ added in v0.5.0
StdlibMarkdown renders the registered surface as a markdown table, the same shape Markdown gives a source listing.
Types ¶
type PathGroup ¶ added in v0.4.0
PathGroup is the paths of one folder: Dir holds the folder, "." when the paths sit in the run directory, and Indexes the positions of its paths in the input slice, so a caller can carry per-path data alongside without the group copying it.
func GroupByDir ¶ added in v0.4.0
GroupByDir buckets paths by the folder holding them, preserving the order the input established both between folders and inside one. Bucketing is explicit rather than relying on the sort, because sorted paths do not keep a folder contiguous: a/b.php, a/m/x.php and a/z.php interleave.
type Row ¶
type Row struct {
Route string // e.g. "GET /users/{id}", "@startup", or empty
Filename string // slash-separated path relative to the working directory
Classes string // comma-separated FQNs, or empty
}
Row is one markdown table row.
type Symbol ¶ added in v0.5.0
type Symbol struct {
Kind string // "function", "class", "method" or "constant"
Name string
Signature string // PHP declaration, or the value for a constant
}
Symbol is one name the runtime answers to, as a script would type it.
func Stdlib ¶ added in v0.5.0
func Stdlib() []Symbol
Stdlib returns everything the standard CLI runtime registers: the functions, the classes and their methods, and the constants.
It answers from the runtime rather than from a checked-in list, so a build reports what that build actually binds. What it cannot report is the doc comment written next to each registration, or the PHP spelling of a parameter name: both are read out of the Go source, which a shipped binary does not carry. Those live in docs/reference/extensions/implemented-apis.md, generated by the same reflection plus a source scan.