apidoc

package
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 13 Imported by: 0

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

func Generate(rt *runner.Runtime, srcRoot string) (string, error)

Generate renders the implemented-apis markdown for the runtime rt, reading doc comments and parameter names from the Go source rooted at srcRoot.

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.

type Method

type Method struct {
	Name    string // PHP spelling, snake_case
	Comment []string
	Params  []Param
	Returns string
}

Method is one PHP-callable method on a registered class.

type Param

type Param struct {
	Name     string // without the dollar sign
	Type     string // PHP type name, empty for a by-reference out parameter
	Variadic bool
	ByRef    bool // the runner's by-reference setter wrapper
}

Param is one PHP-visible parameter of a binding.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL