Encapsulation of routing with slim framework