avoid error with php strict mode when creating objects with no constructor in the factory