那么 - 如果我有一个可能与许多路线匹配的网址怎么办......哪条路线会赢?将分派哪个动作?
它是简单的-首先定义-首先发送的吗?
以下是路线示例:
'route-catchall' => array(
'type' => 'regex',
'options' => array(
'regex' => '/api/v1/.*',
'defaults' => array(
'controller' => 'IndexController',
'action' => 'apiCatchAll',
),
),
),
'route-test1' => array(
'type' => 'literal',
'options' => array(
'route' => '/api/v1/route1',
'defaults' => array(
'controller' => 'IndexController',
'action' => 'apiRoute1',
),
),
),
这个 urlexample.com/api/v1/route1
会被路由到apiRoute1
或 apiCatchAll
吗?