Im having problems with multiple routs, some of them not working.
/**
*
* @url GET /fetch
* @url GET /fetch/lazyload/:lazy
* @url GET /fetch/:id/
* @url GET /fetch/:id/lazyload/:lazy
* @url GET /fetch/start/:offset/limit/:limit
* @url GET /fetch/start/:offset/limit/:limit/lazyload/:lazy
* @url GET /fetch/start/:offset/limit/:limit/sort/:sort
* @url GET /fetch/start/:offset/limit/:limit/sort/:sort/lazyload/:lazy
* @url GET /fetch/start/:offset/limit/:limit/sort/:sort/orderby/:order
* @url GET /fetch/start/:offset/limit/:limit/sort/:sort/orderby/:order/lazyload/:lazy
*/
protected function fetch($id = null, $offset = 0, $limit = 25, $lazy = false, $sort = 'asc', $order = null){
//override
throw new RestException(501);
}
For instace
@url GET /fetch/start/:offset/limit/:limit
will not work if url /fetch/start/1/limit/2
but it will work if /fetch/start/1/2
and
/fetch/:id/
will override /fetch/lazyload/:lazy
so /fetch/lazyload/true
will not work, the recognized pattern will return /fetch:id => lazyload
am I missing something, or this kind of mappings are not possible?
Thank you.