How lcobucci/kafka works
This is a PHP library for Kafka protocol communication, but the shown runtime implements protocol encoding and schema handling—not a Kafka connection or request/response workflow. The visible path is callers supplying structured values to a schema, which delegates fields to typed codecs and a byte buffer. The graph covers the core protocol and its errors; it does not infer transport or other unsampled behavior.
Main entry points: Schema.php Message schema · Buffer.php Byte buffer · SchemaValidationFailure.php Schema validation error · Field.php Schema fields
Components 10
Protocol encoding
- Message schema
src/Protocol/Schema.php - Schema fields
src/Protocol/Schema/Field.php - Typed codecs
src/Protocol/Type - Byte buffer
src/Protocol/Buffer.php - Codec base type
src/Protocol/Type.php
Protocol errors
- Exception interface
src/Exception.php - Buffer errors
src/Protocol/NotEnoughBytesAllocated.php - Range error
src/Protocol/ValueOutOfAllowedRange.php - Schema validation error
src/Protocol/SchemaValidationFailure.php
Other components
- Library caller
Connections 13
- Message schema → Schema fields: delegates fields
src/Protocol/Schema.php - Schema fields → Codec base type: uses codec
src/Protocol/Schema/Field.php - Typed codecs → Byte buffer: reads and writes
src/Protocol/Type/NullableString.php - Message schema → Byte buffer: reads and writes
src/Protocol/Schema.php - Library caller → Message schema: supplies values
- Buffer errors → Exception interface: implements
src/Protocol/NotEnoughBytesAllocated.php - Range error → Exception interface: implements
src/Protocol/ValueOutOfAllowedRange.php - Schema validation error → Exception interface: implements
src/Protocol/SchemaValidationFailure.php - Byte buffer → Buffer errors: throws
src/Protocol/Buffer.php - Byte buffer → Range error: throws
src/Protocol/Buffer.php - Message schema → Schema validation error: throws
src/Protocol/Schema.php - Schema fields → Schema validation error: throws
src/Protocol/Schema/Field.php - Codec base type → Schema validation error: throws
src/Protocol/Type.php