MCPcopy Index your code
hub / github.com/php/frankenphp / Transform

Method Transform

testdata/integration/callable.go:53–64  ·  view source on GitHub ↗

export_php:method Processor::transform(string $input, callable $transformer): string

(input *C.zend_string, callback *C.zval)

Source from the content-addressed store, hash-verified

51
52// export_php:method Processor::transform(string $input, callable $transformer): string
53func (p *Processor) Transform(input *C.zend_string, callback *C.zval) unsafe.Pointer {
54 goInput := frankenphp.GoString(unsafe.Pointer(input))
55
56 callResult := frankenphp.CallPHPCallable(unsafe.Pointer(callback), []any{goInput})
57
58 resultStr, ok := callResult.(string)
59 if !ok {
60 return unsafe.Pointer(input)
61 }
62
63 return frankenphp.PHPString(resultStr, false)
64}

Callers

nothing calls this directly

Calls 3

GoStringFunction · 0.92
CallPHPCallableFunction · 0.92
PHPStringFunction · 0.92

Tested by

no test coverage detected