Transfer method for Cakephp

Sometimes we need to redirect the request to a different controller and different action but do not want to change the current incoming url, which the "redirect" does but we actually want to hide our internal dispatching flow from clients, then we need a function like this:

 

put it under a customized AppController and that's it. It is called "transfer" just because it is similar to the Transfer method from ASP.NET.

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章