pub fn generate_php_protobuf(
schema: &ProtobufSchema,
target: &ProtobufTarget,
) -> Result<String>Expand description
Generate PHP Protobuf code from a schema
Parses the Protobuf schema and generates complete PHP code with message type definitions, service clients, and server implementations based on the target specification. Generated code uses PSR-4 namespacing with PHP 8.1+ typed properties and the google/protobuf library.
§Arguments
schema- Parsed Protobuf schematarget- Generation target:ProtobufTarget::All(complete),ProtobufTarget::Messages(messages only), orProtobufTarget::Services(services only)
§Returns
Generated PHP code as a string, or an error if generation fails