2011-11-29 87 views

回答

2
+0

非常感謝帕斯卡,你送我,我實際使用類似於在sfResponse類找到了正確的道路上 –

+0

。 '$ event = $ this-> dispatcher-> filter(new sfEvent($ this,'response.filter_content'),$ this-> getContent());' –

0

創建一個過濾器,輸出(順序filter.yml)前向右移動它,並使用sfWebResponse得到和設置內容。

class makestuff extends sfFilter { 

    public function execute(sfFilterChain $filterChain) { 
     $filterChain->execute(); 
     $response = $this->getContext()->getResponse(); 
     $response->setContent( $response->getContent()." this comes after </html>"); 
    } 
}