A library for php-wizard level 20 : design pattern, simulator and dynamic generation