Application gives me a wrong action.
I've got the next situation:
//..
$collection = new \Phalcon\Mvc\Micro\Collection();
$collection->setHandler('App\Controllers\Controller', true);
$collection->get('/teams/top', 'getTop');
$collection->get('/teams/{teamid}', 'getDetails');
//..
when i make request to "/teams/top" url i expect to get to
$collection->get('/teams/top', 'getTop');
cause it stands higher then the second.
BUT am getting to this route
$collection->get('/teams/{teamid}', 'getDetails');
Then i've put "getTop" route AFTER "getDetails" and it worked CORRECT!
Why phalcon acting in this way ?! I thought it goes from the top to bottom when searching matching route template..