How sunrise-php/vin works
This is a small PHP ISO-3779 VIN-decoding library. A caller constructs Vin with a VIN string; it uppercases and validates the input, splits WMI/VDS/VIS, determines region, country, manufacturer, and model-year candidates, then exposes the decoded values through getters, an array, or string conversion. The interface defines the getter contract. The excerpts show the decoder’s lookups into three data tables; no external service or persistent store is involved.
Main entry points: Vin.php VIN decoder · regions.php Region data · manufacturers.php Manufacturer data · years.php Model-year data
Components 6
VIN decoding
- VIN decoder
src/Vin.php
Code tables
- Region data
data/regions.php - Manufacturer data
data/manufacturers.php - Model-year data
data/years.php
Public API
- Getter contract
src/VinInterface.php
Other components
- Library caller
Connections 5
- Library caller → VIN decoder: constructs
README.md - VIN decoder → Region data: looks up region/country
src/Vin.php - VIN decoder → Manufacturer data: looks up manufacturer
src/Vin.php - VIN decoder → Model-year data: matches year code
src/Vin.php - VIN decoder → Getter contract: implements
src/Vin.php