Documentation
¶
Overview ¶
Package apidoc generates docs/reference/extensions/implemented-apis.md. It combines two sources of truth: the live runtime, which says what is registered and with which Go signature, and a scan of the Go source, which carries the doc comment written next to each registration and the parameter names the reflect API cannot see. See scripts/list-apis for the entry point.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate renders the implemented-apis markdown for the runtime rt, reading doc comments and parameter names from the Go source rooted at srcRoot.
func Reflect ¶ added in v0.5.0
Reflect is Generate's first half without the source scan: what the runtime registers, with the signature reflection can recover on its own. It is what a shipped binary can answer, since the Go source it was built from is not there to read doc comments and PHP-spelled parameter names out of. Those are the only things missing from the result; the names, types and returns are the same ones the generated reference is rendered from.
Types ¶
type Class ¶
type Class struct {
Name string
Aliases []string
Package string
Comment []string
Params []Param // constructor parameters
Methods []Method
}
Class is one registered class. Classes sharing a constructor (the SPL exception set) collapse into one entry with the extra names in Aliases.
type Func ¶
type Func struct {
Name string
Package string // Go package directory relative to the module root
Area string // subsection within the package, from the register* func
Comment []string // doc comment lines without comment markers
Params []Param
Returns string // PHP type name, "void" when the Go func returns nothing
}
Func is one registered function with everything the renderer needs.