1

Router::requestAction 已在 cakephp 2.x 中删除我需要从路由页面调用该操作。实际上我想更新 url 的缓存,然后我想路由传入的页面。它在 1.3 中是可能的,但在更高版本中不再使用。系统检查路由设置时如何访问控制器功能?

4

1 回答 1

2

Router::requestAction() never existed even in 1.3. The function you are referring to is probably Object::requestAction() and is available in 2.x also. But in 2.x Router doesn't extends Object anymore and hence the function is not available. Still I don't see why you need to call a controller action to update your url cache. I presume you have routes and/or url slugs stored in db which you need and for that you should have a model function which returns the required info.

于 2013-03-10T18:26:03.840 回答