porting expressjs to php: routing engine