made the router class php 5.2 compatible