Elevator pattern — type casting of user defined objects in PHP
https://github.com/jkphl/elevator
latest