2012-06-23 83 views

回答

5

Filters可能是你需要的。
每次運行應用程序時都會先運行過濾器。

只是在應用程序添加過濾器/(前|回)結束/配置/ filters.yml文件:

myFilter: 
    class: myFilter 

而且在LIB創建類/

class myFilter extends sfFilter 
{ 
    public function execute($filterChain) 
    { 
    // write your code here... 

    // execute the next filter 
    $filterChain->execute(); 
    } 
} 
相關問題