genphp

package
v0.18.5 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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

func ClientFile(m *surface.Model) ([]byte, error)

ClientFile returns the contents of bindings/php/src/Encx/Client.php.

func HelpersFile

func HelpersFile(m *surface.Model) ([]byte, error)

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

func MethodName(goName string) string

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.

Jump to

Keyboard shortcuts

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