How brucedeity/pwhexparser works
pwhexparser is a PHP library that turns Perfect World hexadecimal item data into structured arrays, with optional mask-based type selection and field translation. The principal workflow is to configure a Decoder with a type or mask and hex string, validate and decode using that type’s field structure, then return decoded data or a translated view. The graph reflects documented features and sampled calls; unsampled item-type implementations are represented by their existing directory, and no web service or persistent store is evidenced.
Main entry points: Decoder.php Decoder · Types Item structures · Translate.php Translation base · Weapon.php Weapon structure
Components 12
Decode API
- Decoder
app/Decoder.php - Decoded array
- Translated fields
Type Catalog
- Item structures
app/Types - Weapon structure
app/Types/Weapon.php - Jewelry structure
app/Types/Jewelry.php - Role properties
app/Types/Property.php
Decode Support
- Mask mapping
app/Mask.php - Item contract
app/Contracts/Item.php
Translations
- Translation base
app/Contracts/Translate.php - Portuguese labels
lang/pt-BR
Other components
- Library caller
Connections 12
- Library caller → Decoder: configures and invokes
- Decoder → Mask mapping: guesses type via
- Decoder → Item structures: selects type from
- Decoder → Weapon structure: reads structure
- Decoder → Jewelry structure: reads structure
- Decoder → Role properties: reads structure
- Item structures → Item contract: implements
- Decoder → Decoded array: returns decoded data
- Decoder → Translation base: uses for translation
- Translation base → Portuguese labels: loads labels
- Decoder → Translated fields: returns translated data
- Library caller → Decoded array: receives