export_php:method Processor::transform(string $input, callable $transformer): string
(input *C.zend_string, callback *C.zval)
| 51 | |
| 52 | // export_php:method Processor::transform(string $input, callable $transformer): string |
| 53 | func (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 | } |
nothing calls this directly
no test coverage detected