Documentation
¶
Overview ¶
Package genphp emits the PHP side of the encx bindings: the Client class wrapping the opaque Go handle, and the Helpers class holding the package-level functions that need no client.
The output is a pure function of the surface model. Nothing is read from the environment, no map is iterated, and no timestamp or file path reaches the generated text, so the same model always produces the same bytes and a freshly generated file can be diffed against the committed one.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientFile ¶
ClientFile returns the contents of bindings/php/src/Encx/Client.php.
func HelpersFile ¶
HelpersFile returns the contents of bindings/php/src/Encx/Helpers.php.
The file is emitted even when the model binds no package-level function, so that the set of generated files does not depend on the package contents.
func MethodName ¶
MethodName converts a Go identifier into a PHP method name in lowerCamelCase.
The leading run of capitals is lowered as a single word, the way Go itself reads an acronym: ExportHAR becomes exportHAR and Domain becomes domain. When the run is longer than one letter and a lowercase letter follows it, the last capital of the run starts the next word and stays capital, which is what turns APIBaseURL into apiBaseURL and HAREntryCount into harEntryCount.
Types ¶
This section is empty.