klein / klein.php

A fast & flexible router
MIT License
2.66k stars 290 forks source link

How can i get the current route inside callback function #321

Closed dhaya6027 closed 8 years ago

dhaya6027 commented 8 years ago

Awesome job with klein router, can you please guide me to get the current route i pass inside the call back function, i need this so i can return related images for this route from db

$klein->respond('GET', '/about/[:name].html', function ($req, $res, $service, $app, $klein, $matched, $methods_matched){
// i need  '/about/[:name].html' here
})