Documentation
¶
Overview ¶
Package php holds the PHP bindings for encx: a C-shared library built from mobile/encxmobile and the PHP classes that call it through FFI.
The cgo export file, the C header, the surface manifest and the PHP classes are all generated from the Go source of mobile/encxmobile, and a test regenerates them and compares byte for byte, so a change to the bound surface fails the build until they are regenerated. What the model records, and therefore what the drift check sees, is: which symbols are bound and why the rest are not, their signatures, their doc comments, and the shape of every returned struct down to the field names, field types and json tags. Method bodies are not part of it, and deliberately so: reimplementing a bound method without touching its signature leaves the bindings correct.
Run `go generate ./bindings/...` after changing mobile/encxmobile.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
encxphpgen
command
Command encxphpgen generates the PHP bindings for encx from the Go source of mobile/encxmobile.
|
Command encxphpgen generates the PHP bindings for encx from the Go source of mobile/encxmobile. |
|
Command cshared is the c-shared library the PHP bindings load through FFI.
|
Command cshared is the c-shared library the PHP bindings load through FFI. |
|
internal
|
|
|
gen
Package gen emits the C side of the PHP bindings from a surface.Model: the cgo wrapper file compiled into the c-shared library, the FFI-parsable C header, and a JSON manifest describing what was bound and what was not.
|
Package gen emits the C side of the PHP bindings from a surface.Model: the cgo wrapper file compiled into the c-shared library, the FFI-parsable C header, and a JSON manifest describing what was bound and what was not. |
|
genphp
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.
|
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. |
|
rt
Package rt provides the hand-written runtime shared by the generated PHP cgo bindings: a handle registry for live *encxmobile.EncClient values and a JSON response envelope.
|
Package rt provides the hand-written runtime shared by the generated PHP cgo bindings: a handle registry for live *encxmobile.EncClient values and a JSON response envelope. |
|
surface
Package surface models the exported surface of the encxmobile Go package as it can be projected onto a C ABI.
|
Package surface models the exported surface of the encxmobile Go package as it can be projected onto a C ABI. |