2014-09-16 refactor factory class with sample
==>http://www.phptherightway.com/pages/Design-Patterns.html