嗨,我有下面的api url
http://localhost/apiworks/index.php/api/posts
在下面的代码中,这个url是如何管理的(哪个控制器,操作)?
这到底是怎么回事?
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
// REST patterns
array('api/list', 'pattern'=>'api/<model:'w+>', 'verb'=>'GET'),
array('api/view', 'pattern'=>'api/<model:'w+>/<id:'d+>', 'verb'=>'GET'),
'<controller:'w+>/<action:'w+>'=>'<controller>/<action>',
),
array('api/list', 'pattern'=>'api/<model:'w+>', 'verb'=>'GET'),
它在ApiController中查找"posts"的actionList()函数